summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/form
diff options
context:
space:
mode:
authorDhruv Patel <dhp@odoo.com>2020-03-12 12:13:57 +0000
committerDhruv Patel <dhp@odoo.com>2020-04-14 08:47:15 +0000
commitdafba22a6cdc44d3f343e4bca5f369e8be57f58b (patch)
treebd568ec3018853c44abcaf580c98f9f9090cb98c /addons/web/static/src/js/views/form
parentc5cf9e9e5e91da38a704e927af781444f3b0a586 (diff)
[FIX] web,mail: many2many_tags_email: increase limit
A long time ago, commit [1] increased the limit of displayed badges inside a many2many_tags widget, from 40 to 1000 (a large limit that should never been reached with such a widget). However, this solution was specific to the many2many_tags widget, and didn't apply to its extensions (like the many2many_tags_email widget). For instance, open the chatter full composer, add 40 partners in the recipients field and try to add one more: nothing happens. This commit sets the limit on the widget itself. That way, extensions automatically have the same limit, and can override it if needed. [1] d4cf4374d1baa529bb651bb3cc32e9db140963a8 Task : 2091027 closes odoo/odoo#49488 X-original-commit: 02e41f1131b4ea3ad977cc241a3d447c37195f6e Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/form')
-rw-r--r--addons/web/static/src/js/views/form/form_view.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/addons/web/static/src/js/views/form/form_view.js b/addons/web/static/src/js/views/form/form_view.js
index 9d13fd36b16..ba58a131155 100644
--- a/addons/web/static/src/js/views/form/form_view.js
+++ b/addons/web/static/src/js/views/form/form_view.js
@@ -156,11 +156,8 @@ var FormView = BasicView.extend({
*/
_setSubViewLimit: function (attrs) {
var view = attrs.views && attrs.views[attrs.mode];
- var limit = view && view.arch.attrs.limit && parseInt(view.arch.attrs.limit);
- if (!limit && attrs.widget === 'many2many_tags') {
- limit = 1000;
- }
- attrs.limit = limit || 40;
+ var limit = view && view.arch.attrs.limit && parseInt(view.arch.attrs.limit, 10);
+ attrs.limit = limit || attrs.Widget.prototype.limit || 40;
},
});