Odoo Ayuda

0

0
1 Answer
0

Hello

I will link you to an existing answer which breaks down the process nicely:

https://www.odoo.com/en_US/forum/help-1/question/domain-notation-using-multiple-and-nested-and-2170


Essentially, you want to solve the order by abstracting the search logic and then re-adding your details afterwards.


I think (I have not tested) your search would break down to:

AND AND OR A B OR C D OR E F


Once I substitute your values back in, you would be left with:

'&', '&', '|', (saleorders ID in m2m), (all ID), '|', (customers ID in m2m), (all ID), '|', (salespersons in m2m), (all ID)


Again, I'm not certain that logic will work, but you should be able to come close with the process described in the link above.

Good luck!

2 Comments
Dexciss Technology Pvt Ltd, Apoorv Soral
17/12/16 1:39

Hello Travis,

actually, i have problem like this.

all r M2M and search in sale_order with IN condition.

search( [( A & B & C & D) or (A & B & C) or (A & B) or (A) or (B) or (C) or (D)])

how to set conditions like above . please give me any solution.

Travis Waelbroeck
17/12/16 1:44

In that case, check the answer here about complex domain with many2many fields: https://www.odoo.com/forum/help-1/question/complex-many2many-domains-in-views-41777#answer_41784

However, for the search you commented, I think you should be able to simplify it a lot (assuming there are only 4 variables total).

It would be able to break down to: search([A OR B OR C OR D])

In Polish Notation: search(['|', '|', '|', (A), (B), (C), (D)])

Realizar una pregunta
Writer
Keep Informed
1 seguidor(es)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now