-
-
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.
web_widget_x2many_matrix: fix issue with limit of records
- Loading branch information
1 parent
ec0831b
commit 554d7b1
Showing
3 changed files
with
21 additions
and
1 deletion.
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
19 changes: 19 additions & 0 deletions
19
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,19 @@ | ||
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