From d0a69669581f5f5d3f7dbf37b1bb291449f65559 Mon Sep 17 00:00:00 2001 From: Enrique Martin Zabalza Date: Thu, 3 Jun 2021 11:22:29 +0200 Subject: [PATCH] [14.0][FIX] widget_x2many_2d_matrix.js - fix show_column and show_row totals --- .../static/src/js/widget_x2many_2d_matrix.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/web_widget_x2many_2d_matrix/static/src/js/widget_x2many_2d_matrix.js b/web_widget_x2many_2d_matrix/static/src/js/widget_x2many_2d_matrix.js index cea4fe362..7fffedbc0 100644 --- a/web_widget_x2many_2d_matrix/static/src/js/widget_x2many_2d_matrix.js +++ b/web_widget_x2many_2d_matrix/static/src/js/widget_x2many_2d_matrix.js @@ -59,17 +59,13 @@ odoo.define("web_widget_x2many_2d_matrix.widget", function (require) { ) ); } - this.show_row_totals = this.parse_boolean( - node.show_row_totals || + this.show_row_totals = Boolean( + this.parse_boolean(node.show_row_totals || "1") && this.is_aggregatable(field_defs[this.field_value]) - ? "1" - : "" ); - this.show_column_totals = this.parse_boolean( - node.show_column_totals || + this.show_column_totals = Boolean( + this.parse_boolean(node.show_column_totals || "1") && this.is_aggregatable(field_defs[this.field_value]) - ? "1" - : "" ); },