跳至内容
菜单
此问题已终结
3 回复
5039 查看

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
13886
1
10月 16
3926
1
9月 15
10524
0
12月 23
1408
1
5月 23
2919