Sakty Redouane
Sakty Redouane

Reputation: 13

Multiple conditions in domain odoo 8

I have a domain that I want to make a condition.

A or B or C or D

What would be the syntax in XML ? I have tried many syntax's but it did not work.

<field name="domain" >['|', ('sav_diag_check_cd','=',1),('sav_diag_check_cc','=',1),'|',('sav_diag_check_pe','=',1),('sav_diag_check_fe','=',1)]  </field>

Upvotes: 1

Views: 821

Answers (1)

forvas
forvas

Reputation: 10179

Check this:

I don´t understand Normal Polish Notation (NPN or PN). How to build a complex domain in Odoo?

If you understand the explanation I give in my answer, you will never have any problem with Normal Polish Notation. Your case will be solved with:

['|', '|', ('sav_diag_check_cd', '=', 1), ('sav_diag_check_cc', '=', 1), '|', ('sav_diag_check_pe', '=', 1), ('sav_diag_check_fe', '=' ,1)]

Upvotes: 2

Related Questions