Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
2259 มุมมอง

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'

       }"/>

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
เม.ย. 24
1069
1
พ.ย. 24
855
0
ม.ค. 24
864
5
ต.ค. 24
2455
5
ธ.ค. 24
5456