Skip to content

Commit

Permalink
Merge PR #276 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Jun 25, 2024
2 parents 9efedb0 + 8097a32 commit 0a667d5
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 0a667d5

Please sign in to comment.