Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
3469 Näkymät

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?

Avatar
Hylkää
Paras vastaus

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

Avatar
Hylkää
Tekijä

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

Tekijä

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

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
syysk. 21
5585
0
lokak. 20
2213
0
elok. 19
2709
1
heinäk. 19
2988
1
kesäk. 18
3952