Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

web_readonly_bypass limitations #453

Closed
sbidoul opened this issue Oct 22, 2016 · 2 comments
Closed

web_readonly_bypass limitations #453

sbidoul opened this issue Oct 22, 2016 · 2 comments

Comments

@sbidoul
Copy link
Member

sbidoul commented Oct 22, 2016

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

@pedrobaeza
Copy link
Member

I agree that with the new API, onchange are not by view, so it's more suitable to change this as an attribute in the field definition.

@ivantodorovich
Copy link
Contributor

This module is not needed since 11.0, we should probably close this ticket

#739 (comment)

web_readonly_bypass Not needed as Odoo includes a new mechanism for this: (odoo/odoo@3b3f6f0)

@sbidoul sbidoul closed this as completed Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants