Odoo module upgrades, done for you
Your module breaks because attrs= and states= were removed in Odoo 17
In Odoo 17, the attrs= and states= view attributes were removed. Every attrs="{'invisible': [...]}" has to become a direct invisible="..." expression — across every view in your module. It's pure grunt work, and it's the single most common thing that breaks on upgrade.
What the rewrite looks like
Before (Odoo 16 and earlier):
<field name="date_approved"
attrs="{'invisible': [('state', '!=', 'approved')],
'required': [('state', '=', 'approved')]}"/>
After (Odoo 17+), domains become Python expressions on direct attributes:
<field name="date_approved"
invisible="state != 'approved'"
required="state == 'approved'"/>
The same applies to states="draft,sent" on fields and buttons — it becomes an invisible= or readonly= expression. Watch out for the subtle ones: 'invisible' inside list-view columns becomes column_invisible=, complex OR/AND domains need careful translation to boolean expressions, and expressions referencing parent or context behave differently than old-style domains.
Send us the module. We rewrite all of them, install on the target version, and test until it's green. Try it live, then $50 to download.
Try the working result before you pay a cent. No signup to get started.
Looking to upgrade your whole Odoo from one version to the next? Odoo Upgrade Done handles the database, every module, and the move end to end →
Common questions
Why does my Odoo module say attrs is invalid?
Odoo 17 removed the attrs= attribute. The logic now lives in direct attributes like invisible=, readonly=, and required= as Python expressions.