You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, web_readonly_bypass needs to be activated with a flag in the context.
Since a given form may be used in many different situations, it is difficult to properly set the context in all actions where the form is used directly or indirectly.
A possible solution is to activate the behaviour as a field-level option in the view (1), or better as an field-level option in the orm (2).
(2) is better because onchanges are model behaviours not view behaviours (so (1) would still require to have the option added everywhere the field is used), but I don't know if it's possible to add field options in the orm
The text was updated successfully, but these errors were encountered:
Currently, web_readonly_bypass needs to be activated with a flag in the context.
Since a given form may be used in many different situations, it is difficult to properly set the context in all actions where the form is used directly or indirectly.
A possible solution is to activate the behaviour as a field-level option in the view (1), or better as an field-level option in the orm (2).
(1) can should be doable with an override of the save method in form_view.js
https://github.com/odoo/odoo/blob/56d7bf1f46904ed5d92e91559a6b360bf697b003/addons/web/static/src/js/views/form_view.js#L769
by looking at field options and populating readonly_by_pass in a compound context
(2) is better because onchanges are model behaviours not view behaviours (so (1) would still require to have the option added everywhere the field is used), but I don't know if it's possible to add field options in the orm
The text was updated successfully, but these errors were encountered: