-
- Downloads
[FIX] web: editable list: correctly edit in readonly
Some widgets allow the edition in readonly (e.g. boolean_toggle,
priority...). In this case, the changed value is saved directly.
Before this commit, this didn't work in (main) list views: the
widget was updated with the new value, but it wasn't saved in db,
so the change was lost at reload.
This was due to the list controller not being correctly aware of
its mode ('edit' or 'readonly'), on which the basic controller
relies to determine whether a change must be saved directly or
not.
With this commit, a list is always in 'readonly', except when a
row is being edited, in which case it is in 'edit'.
Issue reported on task 2288963
closes odoo/odoo#54049
Signed-off-by:
Julien Mougenot (jum) <jum@odoo.com>
Showing
- addons/web/static/src/js/views/list/list_controller.js 1 addition, 4 deletionsaddons/web/static/src/js/views/list/list_controller.js
- addons/web/static/src/js/views/list/list_view.js 1 addition, 1 deletionaddons/web/static/src/js/views/list/list_view.js
- addons/web/static/tests/views/list_tests.js 46 additions, 0 deletionsaddons/web/static/tests/views/list_tests.js
Loading
Please register or sign in to comment