From 8f60abca98971b2e5a7393ec5f4a06db58785d0c Mon Sep 17 00:00:00 2001 From: Pablo Fuentes Date: Fri, 22 Nov 2019 18:06:19 +0100 Subject: [PATCH] [FIX] web_widget_x2many_2d_matrix: Wrong widget In previous versions _setSubViewLimit was defined at AbstractView widget but in v12 is defined at FormView widget --- web_widget_x2many_2d_matrix/__manifest__.py | 2 +- .../js/abstract_view_matrix_limit_extend.js | 27 +++++++++---------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/web_widget_x2many_2d_matrix/__manifest__.py b/web_widget_x2many_2d_matrix/__manifest__.py index 80d1a201f..c124106e2 100644 --- a/web_widget_x2many_2d_matrix/__manifest__.py +++ b/web_widget_x2many_2d_matrix/__manifest__.py @@ -4,7 +4,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': '2D matrix for x2many fields', - 'version': '12.0.2.0.0', + 'version': '12.0.2.1.0', 'author': ( 'Therp BV, ' 'Tecnativa, ' diff --git a/web_widget_x2many_2d_matrix/static/src/js/abstract_view_matrix_limit_extend.js b/web_widget_x2many_2d_matrix/static/src/js/abstract_view_matrix_limit_extend.js index 5b24c457a..738ff7cec 100644 --- a/web_widget_x2many_2d_matrix/static/src/js/abstract_view_matrix_limit_extend.js +++ b/web_widget_x2many_2d_matrix/static/src/js/abstract_view_matrix_limit_extend.js @@ -1,17 +1,16 @@ odoo.define( "web_widget_x2many_2d_matrix.matrix_limit_extend", function (require) { -"use strict"; + "use strict"; - var AbstractView = require("web.AbstractView"); + var FormView = require("web.FormView"); - AbstractView.include({ - // We extend this method so that the view is not limited to - // just 40 cells when the 'x2many_2d_matrix' widget is used. - _setSubViewLimit: function (attrs) { - this._super(attrs); - if (attrs.widget === "x2many_2d_matrix") { - attrs.limit = Infinity; - } - }, - }); - } -); + FormView.include({ + // We extend this method so that the view is not limited to + // just 40 cells when the 'x2many_2d_matrix' widget is used. + _setSubViewLimit: function (attrs) { + this._super(attrs); + if (attrs.widget === "x2many_2d_matrix") { + attrs.limit = Infinity; + } + }, + }); +});