Odoo Help


How to set search view filter behavior?

on 4/16/13, 4:23 AM 3,161 views

I have defined a search view for my model:

<search string="Fields">
    <group expand="1" string="Group By...">
        <filter name="groupby_month" string="Month" domain="[]" context="{'group_by':'until'}"/>

Now when I view my tree view of the model, groups are never expanded (even with expand="1"), and search filter is always on when tree is accessed through menu.

How could I achieve tree to be expanded by default, and filter to be not on at first by default?

On 4/16/13, 10:09 AM

Looks like there actually is no problem at all, the behavior described in question is normal.


René Schuster

--René Schuster--
| 5 5 8
Weinheim, Germany
--René Schuster--

Challenge Everything!

René Schuster
On 1/9/14, 9:11 AM

The default filters for a search view can be set via the context of the related window action:

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

I don't know, why your groups are not expanded. Facing a similar issue... :/

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

0 follower(s)


Asked: 4/16/13, 4:23 AM
Seen: 3161 times
Last updated: 3/16/15, 8:10 AM