Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
3387 Widoki

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?

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Autor

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

Autor

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

Powiązane posty Odpowiedzi Widoki Czynność
2
wrz 21
5451
0
paź 20
2155
0
sie 19
2592
1
lip 19
2895
1
cze 18
3831