Odoo Help


How to use AND / OR operators in advanced filters?

Francesco OpenCode
on 2/12/13, 3:27 PM 11,614 views

How can I use AND operator in advanced filters in OpenERP 7? If I want search a date range, I obtain always the OR operator and i can't change it.

Can you confirm it works for V7, namely for the online version? With my standard online database I cannot obtain any filtered results with numerical values (prices, costs etc); Is ther a (coming) documentation on filters. I have more than 2000 products! it is therefore essential to be able to filter efficiently.

AD LIBITOM, michel Guénard
on 2/12/13, 6:19 PM

This is the correct way to do it. However the results of filters are not always right.

Laurent Bounin
on 3/5/13, 4:14 PM

As far as I can tell, this is currently not functioning! Ack!

edit= False alarm. Apologies. I was searching Public Price and it needed to be Sale Price. Leaving comment for future reference.

on 3/6/13, 12:11 PM

Ir works perfectly, but some fields (computed ones) are not searchable.

Fabien Pinckaers (fp)
on 4/1/13, 9:49 AM

Guewen Baconnier - Software Developer, Camptocamp

--Guewen Baconnier - Software Developer, Camptocamp--

| 6 7 8
Lausanne, Switzerland
--Guewen Baconnier - Software Developer, Camptocamp--

Guewen works at Camptocamp as an Odoo developer since 2010. He is the lead developer of the Odoo Connector framework and the Magento Connector. He is a delegate member of the OCA, a committer and an active contributor to the OCA projects.


Guewen Baconnier - Software Developer, Camptocamp
On 2/12/13, 3:46 PM

Applying an OR or an AND operator in your filter is done in 2 different ways:

  1. Open the Advanced Search panel, select a criteria, then click on 'Add a condition' to add a second one (do not hit enter or close the filters window), then click on 'Apply'. An OR operator will be applied between those 2 filters.
  2. Open the Advanced Search panel, select a criteria, click on 'Apply'. Open the Advanced Search panel again, select another criteria, click on 'Apply'. An AND operator will be applied between those 2 filters.

In OpenERP 7, the OR operator is part of the same ticker while the AND operator creates 2 separate tickers. The screenshot below shows the difference: the list displays the opportunities that are from the country Canada or China on the one hand, and that have an expected closing date greater than 12/09/2012 on the other hand.

image description

Fabrice: thanks for your edit.

Camptocamp SA, Guewen Baconnier - Software Developer, Camptocamp
on 2/13/13, 2:18 AM

Is this the only way? What if I want to look for a customer that has two different tags at the same time? It is easy to type the tag and select "search tag for XXXX", but when adding the second one OpenERP uses an "OR". Doing it with advanced search is totally cumbersome...

Mario Arias Badila
on 7/19/13, 6:25 PM

Thanks but that behavior is weired. Could be much easier if standard search operator was 'and'.

Andreas Maertens
on 8/29/13, 11:09 AM
On 6/8/16, 2:54 AM

Is there a way to make a second searchbar under the first one that search only for attributs?

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: 2/12/13, 3:27 PM
Seen: 11614 times
Last updated: 6/8/16, 2:54 AM