Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
5046 มุมมอง

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.

Related Posts ตอบกลับ มุมมอง กิจกรรม
many2many field in list view odoo 11 แก้ไขแล้ว
1
มิ.ย. 20
13890
1
ต.ค. 16
3929
1
ก.ย. 15
10524
0
ธ.ค. 23
1413
1
พ.ค. 23
2923