Skip to Content
Menu
This question has been flagged
2 Replies
4982 Views

Hi does anyone know what i have to modify to group my contacts by Tag?

I tried to edit the search view. But get an Error. The tag field is call category_id.
but when i add a line in the search view like:

<group expand="0" name="group_by" string="Group By">

                       <filter name="salesperson" string="Salesperson" domain="[]" context="{'group_by' : 'user_id'}"/>

                       <filter string="Company" context="{'group_by': 'parent_id'}"/>

                       <filter string="Country" context="{'group_by': 'country_id'}"/>

  <filter string="Tag" context="{'group_by': 'category_id'}"/>

                   </group>


I get the error

AssertionError: Fields in 'groupby' must be regular database-persisted fields (no function or related fields), or function fields with store=True
Avatar
Discard
Best Answer

A tag field is supposed to contain more than one value at a time. So it's impossible (and might make little sense) to group contacts by tags. Maybe you need a many2one field like the "industry" field available on res.partner (in Odoo 11)?

Avatar
Discard
Best Answer

I think category_id is compute field

Avatar
Discard
Related Posts Replies Views Activity
2
Dec 24
3376
1
Oct 23
1619
2
Dec 21
6249
1
Aug 21
1870
4
Dec 18
7597