Odoo Help

0

Combine fields in filter domain

By
Rafael Montes
on 8/21/13, 5:08 PM 1,086 views

Hello everyone. In my openerp have divided the field name in firstname and surname. The problem is I have to make a search of my clients. For example if a client of mine called John Doe, if I look John I get, if I look Doe also, but if I put John Doe did not appear in the filter. My question is if I can somehow I combine two fields in the xml for me to perform the search in both. Right now I have it so:

filter_domain="['|','|',('firstname','ilike',self),('surname','ilike',self),('parent_id','ilike',self),('ref','=',self) ]

And I'd like to do something like this:

filter_domain = "['|', '|', ('name + surname', 'ilike', self), ('parent_id', 'ilike', self), ('ref', '=', self)]

Thank you very much.

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

0 follower(s)

Stats

Asked: 8/21/13, 5:08 PM
Seen: 1086 times
Last updated: 3/16/15, 8:10 AM