コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
5716 ビュー

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
アバター
破棄
最善の回答

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

アバター
破棄
最善の回答

I think category_id is compute field

アバター
破棄
関連投稿 返信 ビュー 活動
3
2月 25
4821
1
10月 23
3890
2
12月 21
7727
1
8月 21
2835
4
12月 18
8732