mirror of https://github.com/OCA/web.git
[FIX] web_widget_x2many_2d_matrix: Wrong widget
In previous versions _setSubViewLimit was defined at AbstractView widget but in v12 is defined at FormView widgetpull/1484/head
parent
6d20bb2059
commit
54faf1bd1b
|
@ -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;
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue