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

I have many2many field combined with tree view:

<group>
<field name="cpu_ids" widget="many2many">
<tree>
<field name="name"/>
<field name="frequency_base"/>
<field name="frequency_tb"/>
<field name="cores"/>
<field name="threads"/>
</tree>
</field>
</group>

And when I choose one particular record I can not pick it again for the second time. 
In this example I would like to be able to pick the same CPU couple times.

How do I do this?

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

No, you couldn't its default behavior of many2many field.

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

There is no other way to get this functionality?

you need to adjust your functionality I mean database schema. instead of many2many, one2many can achieve the goal

ผู้เขียน

How exactly? If I make one2many field instead of many2many every CPU will be assigned only once and only to a single device.

Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ก.ย. 21
5632
0
ต.ค. 20
2251
0
ส.ค. 19
2771
1
ก.ค. 19
3037
1
มิ.ย. 18
3976