Odoo Help

Welcome!

This community 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.

0

Combine fields in filter domain

By
Rafael Montes
on 8/21/13, 5:08 PM 824 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.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

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