تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
3437 أدوات العرض

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.

المنشورات ذات الصلة الردود أدوات العرض النشاط
2
سبتمبر 21
5495
0
أكتوبر 20
2182
0
أغسطس 19
2619
1
يوليو 19
2922
1
يونيو 18
3879