Hello everybody,
I am on Odoo 10, and I'd like to use multi condition on domain in xml.
This is the domain that I want to write:
(A and B) Or ( C and D).
How can I do it ?
Thanks.
Best regards
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello everybody,
I am on Odoo 10, and I'd like to use multi condition on domain in xml.
This is the domain that I want to write:
(A and B) Or ( C and D).
How can I do it ?
Thanks.
Best regards
Hi ,
Try This
AND
<field ... domain="[('field_name', '=', id),
('field_name', '=', id) ]" />
OR:
<field ... domain="
['|',('field_name', '=', id),
('field_name', '=', id) ]" />
look this
https://www.odoo.com/fr_FR/forum/aide-1/question/how-to-set-this-specific-domain-in-xml-83173
I want to write like this:
['|',(('field_name','=',value),('field_name1','!=',False)),(('field_name1','=',value),('field_name','!=',False))]
Can you provide us with the code so that I can help you?
Hi,
If you do not use "|"(pipe sign) then it will apply and condition.
if you use "|" (pipe sign) then it will apply or condition.
Please check my code:
OR condition domain="['|', ('field1', 'operator', value), ('field2', 'operator', value)]"
AND condition domain="[('field1', 'operator', value), ('field2', 'operator', value)]"
Hope above will help you.
Hi,
You can write like this,
[ OR, AND, A, B, AND, C, D ]
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up