コンテンツへスキップ
メニュー
この質問にフラグが付けられました

category_ids = fields.Many2many(related='employee_id.category_ids', string='Tags')


In XML tree view:

 


I have tried the above. it's working fine. I can filter the data using category_ids.

But I can't group by using category_ids! I have tried using store=True. but it gives me below error:

psycopg2.errors.UndefinedTable: relation "none" does not exist

 

アバター
破棄
最善の回答

Hi,

You cannot group by many2many fields in Odoo. When you provide a group by filter using a many2many field, You will get an error message like Assertion error.To provide a group by filter using many2many fields

Try refer the blog:

https://www.cybrosys.com/blog/how-to-use-group-by-for-many2many-fields-in-odoo-16


Hope it helps.



アバター
破棄
関連投稿 返信 ビュー 活動
2
2月 22
2154
2
3月 24
2438
1
10月 22
8561
1
9月 22
3573
0
7月 22
3712