Odoo error : the "attrs" and "states" attributes are no longer used.

jeevanizm

Jeevachaithanyan Sivanandan

Posted on January 17, 2024

Odoo error : the "attrs" and "states" attributes are no longer used.

If you get the error

Since 17.0, the "attrs" and "states" attributes are no longer used.
Enter fullscreen mode Exit fullscreen mode

which means you might running Odoo version 17 and there is a change in using attributes in Odoo xml view.

for Odoo 16 or below

<field name="other_address_info" readonly="1" 
                                   attrs="{'invisible': [('type', '!=', 'other')]}" />
Enter fullscreen mode Exit fullscreen mode

but in Odoo 17 it as a below 
  <field name="other_address_info" readonly="1"
                                    invisible = "type == 'other'" />
Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
jeevanizm
Jeevachaithanyan Sivanandan

Posted on January 17, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related