[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
pull/3048/head
Pablo Fuentes 2019-11-22 18:06:19 +01:00 committed by Maksym Yankin
parent f4ea34a25b
commit 0e571a37e1
2 changed files with 14 additions and 15 deletions

View File

@ -4,7 +4,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{ {
'name': '2D matrix for x2many fields', 'name': '2D matrix for x2many fields',
'version': '12.0.2.0.0', 'version': '12.0.2.1.0',
'author': ( 'author': (
'Therp BV, ' 'Therp BV, '
'Tecnativa, ' 'Tecnativa, '

View File

@ -1,17 +1,16 @@
odoo.define( "web_widget_x2many_2d_matrix.matrix_limit_extend", function (require) { 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({ FormView.include({
// We extend this method so that the view is not limited to // We extend this method so that the view is not limited to
// just 40 cells when the 'x2many_2d_matrix' widget is used. // just 40 cells when the 'x2many_2d_matrix' widget is used.
_setSubViewLimit: function (attrs) { _setSubViewLimit: function (attrs) {
this._super(attrs); this._super(attrs);
if (attrs.widget === "x2many_2d_matrix") { if (attrs.widget === "x2many_2d_matrix") {
attrs.limit = Infinity; attrs.limit = Infinity;
} }
}, },
}); });
} });
);