Friday, December 11, 2020
2 changes · master
Resolved issues and error corrections
Odoo now shows a clearer message when a computed field references a dependency that does not exist. This helps implementers and support teams identify configuration mistakes faster during module updates.
Original PR description
Create a model as follow:
class FooModel(models.Model):
_name = 'foo'
bar = fields.Char(compute="compute_bar")
@depends('bazz') # wrong dependency, bazz does not exist
def compute_bar(self):
for rec in self:
rec.bar = "Babar raconte des beaux bobards."
Uppon -u foo_module, a ValueError is rose for the invalid dependency
with the following message:
> Field foo.bar cannot find dependency bazz on model foo.
We had feedback the error message was not very clear to some users,
the new error message is:
> Wrong @depends on 'compute_bar' (compute method of field foo.bar).
> Dependency field 'bazz' not found in model foo.
Task: 2366612This update fixes issues in the website editor so certain page elements are saved reliably and the language selector cannot be accidentally edited. This helps prevent unintended changes when users edit website pages.