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

Hello, I have 2 Models, ModelA and ModelB. They have both a many2many relation on each other. This was to get the tag list working (it was either showing a random one default or not saving), however, it is really only a one2many.

I am looking to figure out how you can restrict ModelB from being connected to more than one ModelA via the domain named argument.


Thanks :)

อวตาร
ละทิ้ง

Domain on many2many field: http://bit.ly/2DarOfB

คำตอบที่ดีที่สุด

Return a domain via onchange function for the related field. The return domain should be like [('id', 'not in', [ids])], here ids should be the current data included in related fields.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
พ.ย. 22
80
1
มิ.ย. 22
7306
2
ต.ค. 21
5121
Many2many domain not working แก้ไขแล้ว
1
ก.ค. 21
2863
Many2many domain not working แก้ไขแล้ว
1
ก.ค. 21
4334