-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1014 from Eficent/11_fix_matrix_limit
[11.0][web_widget_x2many_matrix] fix issue with limit of records
- Loading branch information
Showing
4 changed files
with
20 additions
and
2 deletions.
There are no files selected for viewing
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
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
17 changes: 17 additions & 0 deletions
17
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
odoo.define( "web_widget_x2many_2d_matrix.matrix_limit_extend", function (require) { | ||
"use strict"; | ||
|
||
var AbstractView = require("web.AbstractView"); | ||
|
||
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; | ||
} | ||
}, | ||
}; | ||
} | ||
); |
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