跳至内容
菜单
此问题已终结
1 回复
2210 查看

     

形象
丢弃
最佳答案

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
1305
1
6月 24
1322
2
6月 24
4203
1
6月 24
1881
2
6月 24
2104