Files
odoo_source/addons/web/static/tests
Joseph Caburnay 2b1df29095 [FIX] web: prevent resequence of readonly list field
**Current behavior before PR:**

Even when the "drag-handle" is already hidden (since the field is already readonly),
the items of x2m field can still be resequenced by the user.

**Desired behavior after PR is merged:**

User should not be able to resequence the list items when the list field is already
readonly.

**Solution**

If a shown list is representing a x2many field, it makes sense to prevent
resequencing when the field is "readonly". However, the list is oblivious
of that property unless we force it, therefore we introduce the "readonly"
props to the list renderer.

Note that a heuristic was tried to compute "resequenceability" based on
the "editable" property, but that is rather difficult if not impossible.

Also note that "readonly" defaults to "false" to be compatible with the
current situation where the list is rendered -- list view, field, select/
create dialog -- which by default, the items can be resequenced.

closes odoo/odoo#111797

X-original-commit: 7682a5c87b8e2f59a4c277143d6054adb40edef9
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-02-03 08:24:39 +01:00
..
2023-01-23 16:01:21 +01:00
…