コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
26422 ビュー

I want to know how to do difficult domains with operators, because if I have something easy as: 

(A & B) --> ['&', ('id', 'in', active_ids), ('partner_id', 'in', partner)]

I know to do it

But if I have

(A & B) | C 
or 
( (A & B) | C) |  (D & E) 
I don't know how to do it, because I don't know where I have to put the operators 
アバター
破棄
最善の回答

Hello Celia,

Odoo use polish notation to manage all filters and its operator between two filters. For that you need to have a look inside polish notation if you dont know anything about it. http://en.wikipedia.org/wiki/Polish_notation

From your question : ( (A & B) | C ) | (D & E) will be formed as like below to manage domain inside Odoo.


1) [ '|', '&', '|', '&', (A), (B), (C), (D), (E) ]

2) [ '|', '|', '&', (A), (B), (C), '&', (D), (E)  ] 

3) [ '|' , '&' , (D) , (E) , '|' , '&' , (A) , (B) , (C) ] 


I hope you will get exact idea that how domain is working in Odoo.




アバター
破棄
最善の回答

I guess the #1 results in:

(((A & B) | C) & D) | E

doesn't it?

アバター
破棄
関連投稿 返信 ビュー 活動
4
6月 21
39526
1
12月 20
2716
1
4月 18
7808
3
9月 15
9635
2
8月 15
5496