İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
5673 Görünümler

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
Vazgeç
En İyi Yanıt

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
Vazgeç
En İyi Yanıt

I think category_id is compute field

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
3
Şub 25
4748
1
Eki 23
3736
2
Ara 21
7662
1
Ağu 21
2781
4
Ara 18
8687