Skip to Content
Menú
This question has been flagged

states="done,ignore"

states="draft"

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

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

Avatar
Descartar
Autor

in odoo17 attrs and states is no longer supported brother

Best Answer

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 



Avatar
Descartar
Best Answer

You can give like this,

       attrs="{

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

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

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

           'string': 'Custom Label'

       }"/>

Avatar
Descartar
Related Posts Respostes Vistes Activitat
0
d’abr. 24
1043
1
de nov. 24
844
0
de gen. 24
841
5
d’oct. 24
2412
5
de des. 24
5400