OpenERP 7.0
I have read http://christophe-simonis-at-tiny.blogspot.com/2008/08/new-new-domain-notation.html
I can't work out how to translate the following:
( A OR B ) AND ( C OR D OR E )
I'd appreciate both the answer as well as a method I can use to get the answer myself next time.
The post above gives this example: [ '|' , '|' , ('state', '=', 'open') , ('state', '=', 'closed') , ('state', '=', 'draft') ]
I am assuming this is ( A OR B OR C ).
So my guess is what I need is:
[ '&' , '|' , (A) , (B) , '|' , '|' , (C) , (D) , (E) ]
and my second guess is:
[ '&' , '|' , (A) , (B) , '|' , (C) , '|' , (D) , (E) ]
are these the same?
I'd rather not guess or assume, and rather not test, I'd like to KNOW!
How does the expression get parsed? Does it start from the right?
Ray,
DO NOT do what "Sehrish" suggested, unless you know you have a good reason to do so. It might be easier than figuring out polish notation, but what you're effectively doing is retrieving all records of the given model from the database and then filtering, which is very likely going to be horrible for performance because unless you have maybe 100 records max, you're going to be pulling a lot of data.