-
-
Notifications
You must be signed in to change notification settings - Fork 181
Description
Module
server_environment
Describe the bug
I tried using the webservice module from OCA/web-api, and noticed that the attrs defined for some fields in the view (example here) are being replaced entirely by a readonly attribute set from the _server_env_view_set_readonly method of server_environment.
As a result, any existing attrs like invisible or required are lost.
In later Odoo versions, this issue doesn’t occur because they still rely on _fields_view_get, which is active until Odoo 15. Starting from Odoo 16, _fields_view_get was deprecated, and the _server_env_view_set_readonly method is no longer used when rendering the view — so it doesn't override the attrs anymore.
I'm not sure about the original reasoning for replacing the entire attrs dictionary instead of updating only the readonly part. Perhaps there’s context I’m missing, but this behavior creates conflicts with modules that define additional conditions using attrs.
@qrtl QT5192