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

hello everyone! anyone who can guide me how to convert the following code to odoo v17:


                                    {'required':[('lawyer_type','=','lawyer')]}                           

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

it replace in odoo 17 attrs  to required="lawyer_type == 'lawyer'" and  invisible ="lawyer_type == 'lawyer'"

try this

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hello Hamza,


I hope you're doing well.


Since Odoo 17.0, the "attrs" and "states" attributes are no longer used in the Odoo View architecture.

Instead, you can now use Python expressions that evaluate to a boolean for attributes like readonly, required, and invisible.


Old Code: {'required':[('lawyer_type','=','lawyer')]}

Migrated in V17.0: required="lawyer_type == 'lawyer'"


Kindly follow the document View architecture to understand the changes in odoo version 17.0

I hope this is helpful for you.

Thanks & Regards,

Email:   odoo@aktivsoftware.com           

Skype: kalpeshmaheshwari 


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

I guest this is in the xml, here is the converted code

required="lawyer_type == 'lawyer' "

อวตาร
ละทิ้ง

Hello remember my answer come first

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ส.ค. 25
309
1
ม.ค. 25
1581
1
พ.ย. 24
2010
2
ก.ย. 24
1568
Odoo apps module แก้ไขแล้ว
4
ก.ย. 24
2344