Using the odoo's group, I need to configure my tree view to have a hierarchical view by default.
I created a group as follows
<group expand="0" string="Group By">
<filter name="group_default" string="Default" domain="[]" context="{'group_by':['related_model_id', 'api_method']}"/>
</group>
and then configured it like this.
<field name="context">{"search_default_group_model":1} </field>
but this is giving me error.
Any solutions?
You made a mistake by attempting to include more than one field in a single
<filter>element's context. Instead, you should have added each field independently in separate<filter>tags as given below.And then you can just set multiple values for group by inside the action's context as follow.
This strategy will put the necessary functionality into place.