mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[IMP] web_m2x_options: Added limit for o2m field entries
Added the system parameter "web_m2x_options.field_limit_entries" to set the limit of entries that can be displayed.
This commit is contained in:
@@ -474,4 +474,16 @@ odoo.define("web_m2x_options.web_m2x_options", function (require) {
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
// Extending class to allow change the limit of o2m registry entries using the
|
||||
// system parameter "web_m2x_options.field_limit_entries".
|
||||
FormView.include({
|
||||
_setSubViewLimit: function (attrs) {
|
||||
this._super(attrs);
|
||||
var limit = ir_options["web_m2x_options.field_limit_entries"];
|
||||
if (!_.isUndefined(limit)) {
|
||||
attrs.limit = parseInt(limit);
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user