Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] web: edit a required field in a list view in multi_edit
Before this commit, in a list view in multi_edit mode and editable="0", it was possible to edit a required field with an invalid value. Why: In the PR 101924, we decided to no longer pass readonly/required of fields in non-editable views (if no editable="1"). Solution: To know if a view is editable, you should not only look if it is editable="1" but also if it is multi_edit="1". So we want to pass the readonly/required fields if the view is editable="1" or multi_edit="1". How to reproduce: - Go to a multi_edit="1" and editable="0" list view with at least one required field on the server side - Select the checkbox of the record you want to edit - Edit that field with an invalid value (e.g. clearing a text field) - Click outside the line being edited Before this commit: The record is saved with the invalid value After this commit: An alert dialog is displayed to warn us that the value is invalid. The record returns to readonly mode with the old value. closes #103743 Related: odoo/enterprise#33045 Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
- Loading branch information