upgrade-onchange-domain (U1716)#
An onchange returns a domain, ignored since Odoo 17.0.
Applies to Odoo 17.0 and later.
What it does#
Reports @api.onchange methods that return a dict with a domain key.
Why is this bad?#
Odoo 17.0 ignores the key without a warning (16.0 logged one). What that means depends on the field:
When the field has a domain of its own, in its definition or in a view of the module, the returned domain is dead code: the message says so, and removing it changes nothing.
When it has none, its choices are no longer restricted: a real regression. Put the domain on the field, or compute it into a field the view’s
domainuses.