Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
5634 Widoki

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
Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Najlepsza odpowiedź

I think category_id is compute field

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
3
lut 25
4702
1
paź 23
3694
2
gru 21
7634
1
sie 21
2766
4
gru 18
8674