跳至內容
選單
此問題已被標幟

states="done,ignore"

states="draft"

attrs="{'readonly':[('state','in',['done','ignore'])]}"

attrs="{'required':[('type','in',['sms'])],'invisible':[('type','in',['mail','chat'])]}"

頭像
捨棄
作者

in odoo17 attrs and states is no longer supported brother

最佳答案

You can review the Documentation to learn about that changes

https://www.odoo.com/documentation/17.0/developer/reference/user_interface/view_architectures.html#semantic-components

Use readonly and required and invisible 



頭像
捨棄
最佳答案

You can give like this,

       attrs="{

           'readonly': [('state', 'in', ['done', 'ignore'])],

           'required': [('type', 'in', ['sms'])],

           'invisible': [('type', 'in', ['mail', 'chat'])],

           'string': 'Custom Label'

       }"/>

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
4月 24
991
1
11月 24
811
0
1月 24
809
5
10月 24
2386
5
12月 24
5272