Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda

states="done,ignore"

states="draft"

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

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

Avatar
Buang
Penulis

in odoo17 attrs and states is no longer supported brother

Jawaban Terbai

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
Buang
Jawaban Terbai

You can give like this,

       attrs="{

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

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

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

           'string': 'Custom Label'

       }"/>

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
0
Apr 24
1017
1
Nov 24
829
0
Jan 24
821
5
Okt 24
2399
5
Des 24
5334