I want to add default_group_by in kanban view. So i added below code:
<record id="res_partner_kanban_view_inherit" model="ir.ui.view">
<field name="name">res.partner.kanban.inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.res_partner_kanban_view"/>
<field name="arch" type="xml">
<xpath expr="//kanban" position="replace">
<kanban default_group_by="category_id" class="o_res_partner_kanban">
<field name="category_id"/>
</kanban>
</xpath>
</field>
</record>
I want to sort my field using category_id,so i wrote this code,
but I am getting below error:
if anyone know,Please help me out
File "/home/odoo/odoo/v13/odoo-server/odoo/models.py", line 2160, in _read_group_raw assert gb_field.store and gb_field.column_type, "Fields in 'groupby' must be regular database-persisted fields (no function or related fields), or function fields with store=True" AssertionError: Fields in 'groupby' must be regular database-persisted fields (no function or related fields), or function fields with store=True