Odoo Help


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.


Does the search method use context?

Kurt Heisel
on 4/30/15, 4:56 PM 466 views

So I am wondering, does the search method parse the context argument into the where clause in any way? So if context held 'account_id':5 does object.search(....,context) build something like "account_id = 5" into the resulting where clause?

Or do I need to directly call the important key value pair from context into the standard args tuple with operator?

Vince Vinet
On 4/30/15, 5:26 PM

The default behavior doesn't take a search domain from the context, although the context does have an impact on a few things such as excluding inactive records, the handling of related fields, etc...

Some models may modify the domain based on the context, but it isn't the standard behavior.

If you need to search for a specific domain, put it in the domain args.

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

1 follower(s)


Asked: 4/30/15, 4:56 PM
Seen: 466 times
Last updated: 4/30/15, 5:26 PM