Odoo Help

Welcome!

This community 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.

1

How to add a default 'group by' filter to tree view?

By
samir
on 9/2/13, 7:17 AM 16,319 views

hi all ,

i have a tree view , i want to show it by default with grouped by (grouped by employee_id)

if someone can help .

thanks

9

Grover Menacho

--Grover Menacho--
2523
| 5 7 8
La Paz, Bolivia
--Grover Menacho--

Systems Engineer + MBA

Grover Menacho
On 10/7/13, 10:46 AM

On your search view you have something like this:

<filter name="group_employee_id" string="Category" icon="terp-partner" context="{'group_by':'employee_id'}"/>

So, on your action you have to send this by context:

<field name="context">{'search_default_group_employee_id': 1}</field>

I tried with just {'group_by': 'employee_id'} in the action context and it works.

Leonardo Donelli
on 9/10/14, 11:54 AM
2
Ratmil Torres
On 5/6/15, 11:14 AM

What if this treeview is inside a form? Not called from an action.

Good question. I would also like to know.

Limitless Virtual Enterprise, Andre de Kock
on 7/14/15, 3:02 AM
1

Axel Mendoza

--Axel Mendoza--
10205
| 7 7 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full time employee trying to understand what to do an how

Reach me at aekroft@gmail.com

Axel Mendoza
On 8/7/15, 1:09 PM

I do this in v7 it require an extension of the widget one2many or many2many

0
Badache Zoubir
On 4/28/16, 5:30 AM

<record id=".............." model="ir.actions.act_window" >

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

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

<field name="view_type">form</field>

<field name="context">{'group_by':'employee_id'}</field>

<field name="view_mode">tree</field>

<field name="domain">[('active', '=', True)]</field>

</record>

0
Noel Jesús Rivero
On 4/8/16, 10:04 AM

Nice solution

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 9/2/13, 7:17 AM
Seen: 16319 times
Last updated: 4/28/16, 5:30 AM