跳至內容
選單
此問題已被標幟
1 回覆
3279 瀏覽次數

     

頭像
捨棄
最佳答案

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

相關帖文 回覆 瀏覽次數 活動
1
7月 24
1815
1
6月 24
1772
2
6月 24
4944
1
6月 24
2440
2
6月 24
2765