forked from Techsystech/web
web_widget_x2many_2d_matrix: Fix show_column_totals option
Commit a5e6acc3
introduced a bug, where show_column_totals="0" wouldn't work.
This is because JS ternary operator took node's attribute value as part of the condition.
As an example simplified JS code (before change):
`'0' || true ? '1' : ''` -> `'1'`
And this is what was probably meant originally (after change)
`'0' || (true ? '1' : '')` -> `'0'`
12.0
parent
e528c12926
commit
74559098b4
|
@ -68,11 +68,11 @@ odoo.define('web_widget_x2many_2d_matrix.widget', function (require) {
|
|||
}
|
||||
this.show_row_totals = this.parse_boolean(
|
||||
node.show_row_totals ||
|
||||
this.is_aggregatable(field_defs[this.field_value]) ? '1' : ''
|
||||
(this.is_aggregatable(field_defs[this.field_value]) ? '1' : '')
|
||||
);
|
||||
this.show_column_totals = this.parse_boolean(
|
||||
node.show_column_totals ||
|
||||
this.is_aggregatable(field_defs[this.field_value]) ? '1' : ''
|
||||
(this.is_aggregatable(field_defs[this.field_value]) ? '1' : '')
|
||||
);
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue