Odoo Help


How do I configure a default search criteria?

on 3/7/13, 6:17 PM 7,061 views

Currently, Sales->Sales->Sales Orders is filter free, and shows all users all the Sales Orders in all states.

I would like this to come up with a default search of "Sales" (which is an easily selected option from the dropdown menu of the Search bar). However, I want it to be easily cleared in the event that a "done" or "canceled" sales order needs to be found.

I can configure the default filter in "Domain Value" under Settings->Technical->User Interface->Window Actions, but when the filter is configured here, the normal user cannot clear it.

I'm sure this is something simple, I've just not found the right place to configure it, or my lack of knowledge of Python is preventing me from implementing it.

Any assistance is appreciated. Jason


Andreas Brueckl

--Andreas Brueckl--

| 7 8 7
Vienna, Austria
--Andreas Brueckl--
OpenERP Consulting and Development
Andreas Brueckl
On 3/7/13, 6:29 PM

You can set default filters in the context of the window action.

Just write:


to set filter <value> as default. For the sales order the following pre-defined filters are available (use it instead of <value>):

  • name
  • type_person
  • type_company
  • customer
  • supplier

Or you can create a new filter in the SearchView. Instead of changing window actions and views in the Settings menu you can also activate the Developer Mode - see here

Andreas - Thank you for your help, I was able to get the Sales Order to configure they way I wanted by adding {"search_default_sales":1} in the Window Action. However, when I tried to do this same exact thing in the Sales->Sales->Quotations window {"search_default_quotations":1}, the search doesn't show up in the Search bar. Any reason why the two windows behave differently?

on 3/7/13, 7:09 PM

I figured it out. Even though the "filter" name is "Quotations" the default search criteria is "draft"; so putting the context of {"search_default_draft":1} resulted in the desired behavior. Thanks again for pointing me in the right direction.

on 3/7/13, 7:36 PM

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: 3/7/13, 6:17 PM
Seen: 7061 times
Last updated: 3/16/15, 8:10 AM