Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
3238 Weergaven

     

Avatar
Annuleer
Beste antwoord

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
Annuleer
Auteur

THANKS YOU

Auteur

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')]}"/>

Auteur

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

Gerelateerde posts Antwoorden Weergaven Activiteit
1
jul. 24
1807
1
jun. 24
1765
2
jun. 24
4927
1
jun. 24
2423
2
jun. 24
2745