This question has been flagged

Using version 6.1.1 and I have assigned partners into various categories based on location and now I want to try and see the sales based on these categories. When I am in the sales order list view there does not seem to be any option to group via partner categories. I have tried to add a new group by filter, but the partner category does not seem to be available.

Is there a way to do this?

Avatar
Discard

I have the same need for version 7, I'm looking for a solution ... and if I find, I share it.

Best Answer

You can't group by a many2many field. Some similar question:

https://accounts.openerp.com/forum/Help-1/question/22335/

My advise to you is to add a new one_category_id many2one field linked to the res.partner.category model and put it in your partner view.

Then add a new filter to your search view :

<filter string="Category" context="{'group_by': 'one_category_id'}"/>

The difference is that in this case you can only specify one category per partner.

Avatar
Discard