跳至內容
選單
此問題已被標幟
3 回覆
5023 瀏覽次數

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
6月 20
13883
1
10月 16
3925
1
9月 15
10522
0
12月 23
1406
1
5月 23
2911