Jignesh Patel
Jignesh Patel

Reputation: 5

How to add "Group By" to Tree View in Odoo V11?

I am new in odoo.

I have a tree view , i want to show it by default with grouped by according to my stage_id.

Any one help me.

Thanks

Upvotes: 0

Views: 1717

Answers (1)

Manish Bohra
Manish Bohra

Reputation: 340

<field name="name">dmr.search.view</field>   

<field name="model">model.name</field>   

<field name="arch" type="xml">       

    <search string="DMR">           

        <filter name="group_customer_id" string="Customer" icon="terp-partner" context="{'group_by':'field_name'}"/>       

    </search>   

</field>

After adding search record, you need to add search_view_id in action.

For Ex :-

In action

<field name="search_view_id" ref="dmr_search_view"/>

I hope it works for you

Upvotes: 1

Related Questions