跳至內容
選單
此問題已被標幟
2 回覆
6437 瀏覽次數

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.

頭像
捨棄
最佳答案

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

最佳答案

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.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
1月 25
1201
0
7月 22
2306
3
9月 20
2976
2
12月 15
4610
0
3月 15
3306