Odoo Help

0

or evaluation for context in actions

By
Kevin McMenamin
on 7/23/13, 2:51 AM 1,287 views

model is ir.actions.act_window

I want to have context evaluate as OR not AND for following

<field name="context">{'search_default_writer': active_id }</field> <field name="context">{'search_default_director':active_id }</field> <field name="context">{'search_default_producer':active_id }</field>

Obviously these need to be in a single context statement, but what is correct format.

0
Stephane
On 7/23/13, 12:43 PM

Just separate with , <field name="context">{'search_default_writer': active_id, 'search_default_director': active_id, 'search_default_producer': active_id }</field>

I tried that initially - creates an AND logic statement (ie values = A and values = B and values = C) not an OR statement. I tried putting the '|' at the front but it didn't like that

Solnet Solutions Limited, Kevin McMenamin
on 7/23/13, 5:42 PM
0

Grover Menacho

--Grover Menacho--
GH Mediacloud
2533
| 5 7 8
La Paz, Bolivia
--Grover Menacho--

Systems Engineer + MBA

Grover Menacho
On 7/23/13, 2:32 PM

I think that you are making some mistakes here.

The context sent on the ir.actions is going to be a value in the context dictionary. It's not conditional, it's only going to send all the context. Domains are conditional, but context are only variables that you are sending to the window.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

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 E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 7/23/13, 2:51 AM
Seen: 1287 times
Last updated: 3/16/15, 8:10 AM