Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3413 มุมมอง

     

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
ผู้เขียน

THANKS YOU

ผู้เขียน

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

ผู้เขียน

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

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.ค. 24
1847
1
มิ.ย. 24
1805
install odoo17 enterprise version แก้ไขแล้ว
2
มิ.ย. 24
5029
1
มิ.ย. 24
2503
2
มิ.ย. 24
2828