summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2021-03-04 15:11:38 +0000
committerAaron Bohy <aab@odoo.com>2021-03-05 14:04:43 +0000
commit2cf5e8fb62f5ec88d13ad613c76f65fab8b50d65 (patch)
tree3f7275d9ae3cf075a953a34dd3846d13c3c8241c /doc
parent45ae3311fa3f244f9b54349686cb0da8c7fa6a9a (diff)
[FIX] web: correctly edit Many2ManyCheckboxes with 100+ values
The Many2ManyCheckboxes widget displays all values that could be in the many2many relation, with a checkbox indicating whether each value is in the relation or not. It is designed to be set on fields where the comodel contains a few records (typically, we don't want to see dozens of checkboxes in the form view). This widget shouldn't be used on many2manys with a large comodel, as we have better tools to handle them (like a tree view). We deal with extreme cases (when the widget is, by mistake, set on a field where the comodel is huge) by using the name_search limit of 100: at most 100 checkboxes are displayed. Before this commit, this extreme situation wasn't correctly handled. If there were in the relation records that weren't displayed (because they weren't inside the 100 limit), then, editing the value by (un)selecting a checkbox would automatically remove all non displayed values from the relation. This commit ensures that we keep in the relation all values that aren't displayed. Issue spotted when working on opw~2439041 closes odoo/odoo#67373 X-original-commit: fa324ef071952d749f635f878bee0fa462cfa011 Signed-off-by: Géry Debongnie (ged) <ged@openerp.com> Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/reference/javascript_reference.rst7
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/reference/javascript_reference.rst b/doc/reference/javascript_reference.rst
index eb27db11501..3bc0ce383f6 100644
--- a/doc/reference/javascript_reference.rst
+++ b/doc/reference/javascript_reference.rst
@@ -2234,8 +2234,11 @@ kanban.many2many_tags (KanbanFieldMany2ManyTags)
- Supported field types: *many2many*
many2many_checkboxes (FieldMany2ManyCheckBoxes)
- This field displays a list of checkboxes and allow the user to select a
- subset of the choices.
+ This field displays a list of checkboxes and allows the user to select a
+ subset of the choices. Note that the number of displayed values is limited to
+ 100. This limit isn't customizable. It simply allows to handle extreme cases
+ where this widget is wrongly set on a field with a huge comodel. In those
+ cases, a list view is more adequate as it allows pagination and filtering.
- Supported field types: *many2many*