domain syntax

Asked by B. ZEGHICHE

Hello,

I'm trying to express this condition in domain syntax

( ('a','=','b') AND ('c','=','d') ) OR ( ('e','=','f') AND ('g','=','k') )

I dont know where to place the '|' and '&' to make the domain work

Best regards

Pedro

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
B. ZEGHICHE
Solved:
Last query:
Last reply:
Revision history for this message
B. ZEGHICHE (badreddine-zeghiche) said :
#1

thks

Revision history for this message
Nicolas Clavier (nicoclavier) said :
#2

Hi,

I had the same question in this post:
http://www.openerp.com/forum/topic28658.html

here's your code:
[ '|', '&', ('a','=','b'),('c','=','d'), '&', ('e','=','f'), ('g','=','k') ]

the number of arguments for '|' and '&' is 2 therefore you can assume that the following 2 tuples are captured by the operator making it *one block*. Your can then prepend an operator to capture 2 of these block .. etc