Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
5685 Vizualizări

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
Imagine profil
Abandonează
Cel mai bun răspuns

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)?

Imagine profil
Abandonează
Cel mai bun răspuns

I think category_id is compute field

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
3
feb. 25
4792
1
oct. 23
3774
2
dec. 21
7689
1
aug. 21
2807
4
dec. 18
8706