Skip to content
Snippets Groups Projects
user avatar
Denis Ledoux authored
Since odoo/odoo#99660
the `depends` field attribute is no longer passed
from the server to the web client.

Because of this, the "Set Defaults" feature
of the debug menu is completely unusable,
as the list of fields on which to set a default is empty because of it.

The use of this `depends` field attribute has been introduced in
revision odoo/odoo@ce9bbf6c10962e64138c04ca34b7485084e4cdaa
In the commit description, we can read that setting a default
on computed fields having depends has been disabled
because the defaults set were being overwritten by the call to onchange.
Note that only the fact the field has depends is required,
the actual list of field names is not used, just the fact the list is
not empty.

However, since revision
odoo/odoo@488e334fc8fd6601e304635fa577c98b9bfd18e6,
available since Odoo 14.0,
this is no longer the case, the defaults are no longer being overwritten
by the call to `onchange`, since the `default_get` has been integrated
into the `onchange`.

A video attached to the pull request of this revision
shows the behavior difference.

Hence, setting a default on a computed fields having depends
(with an inverse method, hence not readonly)
can be allowed again in this "Set defaults" debug feature,
therefore avoiding to have to send back the `depends` field attributes
to the web client.

opw-3031290
opw-3038711
opw-3055292

closes odoo/odoo#105009

Signed-off-by: default avatarDenis Ledoux (dle) <dle@odoo.com>
48ac7992
History
Name Last commit Last update