İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
3264 Görünümler

     

Avatar
Vazgeç
En İyi Yanıt

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
Vazgeç
Üretici

THANKS YOU

Üretici

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

Üretici

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

İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Tem 24
1814
1
Haz 24
1769
2
Haz 24
4941
1
Haz 24
2433
2
Haz 24
2762