From 399d74202e785bee160a4af52e98310f441fee14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?= Date: Tue, 25 Jun 2024 08:34:01 +0200 Subject: [PATCH] [FIX] sale_layout_category_hide_detail: Full width to note lines Note type lines do not need to add any logic, they need to maintain full width TT49131 --- .../src/js/sale_layout_category_hide_detail.esm.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sale_layout_category_hide_detail/static/src/js/sale_layout_category_hide_detail.esm.js b/sale_layout_category_hide_detail/static/src/js/sale_layout_category_hide_detail.esm.js index 5ec18b91..6c346ae3 100644 --- a/sale_layout_category_hide_detail/static/src/js/sale_layout_category_hide_detail.esm.js +++ b/sale_layout_category_hide_detail/static/src/js/sale_layout_category_hide_detail.esm.js @@ -8,7 +8,16 @@ import {SectionAndNoteListRenderer} from "@account/components/section_and_note_f import {patch} from "@web/core/utils/patch"; patch(SectionAndNoteListRenderer.prototype, { + getColumns(record) { + // Set record to use it in getSectionColumns() + this.record = record; + return super.getColumns(record); + }, getSectionColumns(columns) { + // We do not want to display icons in notes, only in sections + if (this.record.data.display_type !== "line_section") { + return super.getSectionColumns(columns); + } var sectionCols = super.getSectionColumns(columns); const widgetCols = columns.filter((col) => col.widget === "boolean_fa_icon"); const sectionWidget = widgetCols.map((col) => {