Skip to content

Commit

Permalink
[FIX] sale_layout_category_hide_detail: Full width to note lines
Browse files Browse the repository at this point in the history
Note type lines do not need to add any logic, they need to maintain full width

TT49131
  • Loading branch information
victoralmau committed Jun 25, 2024
1 parent 94c6e72 commit 4acb3d5
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,16 @@ import {SectionAndNoteListRenderer} from "@account/components/section_and_note_f
import {patch} from "@web/core/utils/patch";

patch(SectionAndNoteListRenderer.prototype, "new_widgets_buttons_patch", {
getColumns(record) {
// Set record to use it in getSectionColumns()
this.record = record;
return this._super.apply(this, arguments);
},
getSectionColumns(columns) {
// We do not want to display icons in notes, only in sections
if (this.record.data.display_type != "line_section") {
return this._super.apply(this, arguments);
}
var sectionCols = this._super.apply(this, arguments);
const widgetCols = columns.filter((col) => col.widget === "boolean_fa_icon");
const sectionWidget = widgetCols.map((col) => {
Expand Down

0 comments on commit 4acb3d5

Please sign in to comment.