Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by pedrobaeza
- Loading branch information
Showing
1 changed file
with
13 additions
and
14 deletions.
There are no files selected for viewing
27 changes: 13 additions & 14 deletions
27
web_widget_x2many_2d_matrix/static/src/js/abstract_view_matrix_limit_extend.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
}, | ||
}); | ||
}); |