Skip to Content
Menu
Dette spørgsmål er blevet anmeldt

states="done,ignore"

states="draft"

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

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

Avatar
Kassér
Forfatter

in odoo17 attrs and states is no longer supported brother

Bedste svar

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
Kassér
Bedste svar

You can give like this,

       attrs="{

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

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

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

           'string': 'Custom Label'

       }"/>

Avatar
Kassér
Related Posts Besvarelser Visninger Aktivitet
0
apr. 24
1060
1
nov. 24
853
0
jan. 24
853
5
okt. 24
2440
5
dec. 24
5442