Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
6543 Lượt xem

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.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Tác giả

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

Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 1 25
1354
0
thg 7 22
2437
3
thg 9 20
3092
2
thg 12 15
4708
0
thg 3 15
3424