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

I tried two ways to display many2many field in list view but none of them worked:

1) <field name="test_ids"/> --> It shows just the number of records.(i.e. (3 records))

2) <field name="test_ids" widget="many2many"/> --> It shows the ids of records. (i.e. 2,3,4)

How to achive this?

الصورة الرمزية
إهمال
أفضل إجابة

use ==> widget="many2many_tags"

الصورة الرمزية
إهمال
الكاتب

I already tried this but not working. It shows the ids of records. (i.e. 2,3,4)

الكاتب

Tnx. There was some issue in my db. I created new db and it worked.

أفضل إجابة

Hello Rakesh,

.py - field_name = fields.Many2many('res.partner', string="many2many_tags")

.xml - <field name="field_name" widget="many2many_tags"/>


Hope it helps,

Regards,

Mayank Gosai

الصورة الرمزية
إهمال
الكاتب

Tnx. There was some issue in my db. I created new db and it worked.

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
يونيو 20
13882
1
أكتوبر 16
3924
1
سبتمبر 15
10519
0
ديسمبر 23
1406
1
مايو 23
2910