Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
3465 Lượt xem

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?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Tác giả

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

Tác giả

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

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 9 21
5581
0
thg 10 20
2211
0
thg 8 19
2703
1
thg 7 19
2984
1
thg 6 18
3946