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

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.



อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
How to 'group by' "is_win" in CRM VIEWS. แก้ไขแล้ว
2
ก.พ. 22
2151
2
มี.ค. 24
2427
1
ต.ค. 22
8554
1
ก.ย. 22
3569
0
ก.ค. 22
3709