Odoo Help


How to group by in one2many tree view

Giezel Esteves
on 10/28/16, 4:24 AM 1,047 views

How to group by in one2many tree view

On 11/1/16, 2:01 AM

please try ,

<record id="search_mail_partner_ids" model="ir.ui.view">

    <field name="name">Channel Search</field>

    <field name="model">Your one2many model</field>

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


       <group expand="0" name="group_by" string="Group By">

            <filter name="field name" string="string" domain ="[('xxx','yy',zz)]" context="{'group_by':'field name'}" />





Nilmar Shereef
On 10/28/16, 5:20 AM

You mean you have to arrange the fields of one2many ?. Then you should give a view to the one2many object. Then in xml file, give the record id into form_view_ref as context. I think this is the solution (Question is not descriptive, If you clear the question, It may helpfull)

Giezel Esteves
On 10/28/16, 8:31 PM

Something like this:

<field name="one2many_ids">


         <field name="field1"/>

         <field name="field2"/>



I want to use group by in tree view but I don't know how

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 10/28/16, 4:24 AM
Seen: 1047 times
Last updated: 11/9/16, 3:57 AM