diff --git a/sale_layout_category_hide_detail/static/src/js/sale_layout_category_hide_detail.js b/sale_layout_category_hide_detail/static/src/js/sale_layout_category_hide_detail.js index b75c8dafd..6447b86d4 100644 --- a/sale_layout_category_hide_detail/static/src/js/sale_layout_category_hide_detail.js +++ b/sale_layout_category_hide_detail/static/src/js/sale_layout_category_hide_detail.js @@ -31,11 +31,15 @@ odoo.define( nbrColumns -= this._getNumberOfLineSectionFields(); return nbrColumns; }, - _renderBodyCell: function (record, node) { - var $cell = this._super.apply(this, arguments); + _allowRenderBodyCell: function (record) { + // Method to be overwritten if someone needs it var isSection = record.data.display_type === "line_section"; var isNote = record.data.display_type === "line_note"; - if (isSection || isNote) { + return isSection || isNote; + }, + _renderBodyCell: function (record, node) { + var $cell = this._super.apply(this, arguments); + if (this._allowRenderBodyCell(record)) { if (this._allowRemoveClassHidden(node.attrs.name)) { return $cell.removeClass("o_hidden"); } else if (node.attrs.name === "name") {