Skip to content
Snippets Groups Projects
Commit ff1329ca authored by std-odoo's avatar std-odoo
Browse files

[FIX] web: do not write before saving when clicking on a radio


Bug
===
If we open a view in readonly mode, click on a radio widget and if a
constraint exists on this field, an error message is raised.
(e.g. the enroll field in "website_slides_sale").

Technical
=========
This is because in the "Basic controller", in the "_onFieldChanged",
we force "force_save" if the view is in readonly mode. This is wanted
for widgets that can change the value even in readonly mode
(e.g. Priority), but clicking on a Radio widget switch the mode to edit,
so this is not needed.

To fix that, we call `setValue` after switching to the edit mode. So
the `setValue` is skipped in `_onInputClick` if we are in readonly mode,
and the `setValue` is done in `_quickEdit` instead.

Task-2668763

closes odoo/odoo#78392

Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
parent d135916b
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment