Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
2259 Ansichten

     

Avatar
Verwerfen
Beste Antwort

Hi,


In odoo 17 there is technical changes on usage of attrs and states.


You can directly add condition for readonly, invisible,required in respected attribute.




Refer this script also for easily converting: 

https://github.com/pierrelocus/odoo-attrs-replace

Hope this will help you

Thanks

Avatar
Verwerfen
Autor

THANKS YOU

Autor

The migration from 16 to 17 really tires me too much, here is another error

<field name="amount_fix" attrs="{'invisible':[('amount_select','&lt;&gt;','fix')], 'required':[('amount_select','=','fix')]}"/><newline/>
<field colspan="4" name="amount_python_compute" attrs="{'invisible':[('amount_select','&lt;&gt;','code')], 'required':[('amount_select','=','code')]}"/>
<field name="amount_percentage" attrs="{'invisible':[('amount_select','&lt;&gt;','percentage')], 'required':[('amount_select','=','percentage')]}"/>

Autor

when I run this is the error:
(venv) PS C:\Users\BUYER CT\OneDrive\Documents\plantation> python3 replace_attrs.py
Python was not found. Execute without arguments to proceed to

Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Juli 24
1343
1
Juni 24
1373
2
Juni 24
4274
1
Juni 24
1916
2
Juni 24
2145