Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
3643 Zobrazení

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

 

Avatar
Zrušit
Nejlepší odpověď

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.



Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
úno 22
2164
2
bře 24
2455
1
říj 22
8571
1
zář 22
3586
0
čvc 22
3727