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

I have many 2one field like this <field name="contract_id" widget="selection" domain="[('partner_id','=',partner_id),('state','=','draft')]" required="1"/>

i am getting invalid architecture problem how to solve the issue

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

Unfortunately widget="selection" don't support dinamic domain.

If you need widget selection then remove from domain non static value like partner_id:

<field name="contract_id" widget="selection" domain="[('state','=','draft')]" required="1"/>

If you need domain with dinamic value you have to remove widget="selection":

<field name="contract_id" domain="[('partner_id','=',partner_id),('state','=','draft')]" required="1"/>
อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

u dont have to use widget="selection" just romove it and in py file u have to declare yr colum as 'contract_id': fields.selection()

อวตาร
ละทิ้ง
ผู้เขียน

how to use many2one to fields.selection ?

Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ก.ย. 23
9728
Domain with inherited field แก้ไขแล้ว
1
ต.ค. 22
3858
0
ต.ค. 20
3267
1
ส.ค. 17
3733
8
ก.พ. 17
8400