Odoo Help

0

how to add search multiple

By
oussama
on 10/23/14, 1:17 PM 1,956 views

Hi

how to add search multiple of three field

this  code is working

<field name="street"    filter_domain="['|',('street','ilike',self),('city','ilike',self) string="Rue" />

but when i add field street2 to this code is not working

<field name="street"    filter_domain="['|',('street','ilike',self),('city','ilike',self),('street2','ilike',self)]" string="Rue" />

 

Thanks

0

For setting a domain in Odoo, It is a common terminology to use

AND CONDITION: domain = [('street','ilike',self),('city','ilike',self)]

OR CONDITION: domain = ['|',('street','ilike',self),('city','ilike',self)]

So, use this condition for your case:

<field name="street"    filter_domain="['|',  '|', ('street','ilike',self),('city','ilike',self),('street2','ilike',self)]" string="Rue" />

I have a added an "OR condition" in the filter_domain, so that you can search in either street, city or street2.

 

Thank you it works

oussama
on 10/24/14, 3:41 AM

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.

Register

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)

Stats

Asked: 10/23/14, 1:17 PM
Seen: 1956 times
Last updated: 3/16/15, 8:10 AM