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

I created a report for contracts, and I'm showing it in the client_print_multi menu.

How could I restrict the conditions for showing it? Eg. for some companies only: I tried adding a domain but the link is still always visible.

Here is the report link definition, referring to a report defined in the same XML with ID "areoo_agreement": here I'm unsuccessfully trying to show the link for all companies but the first one.

    <ir_set>
<field eval="'action'" name="key"/>
<field eval="'client_print_multi'" name="key2"/>
<field eval="['account.analytic.account']" name="models"/>
<field name="name">Agreement Report</field>
<field eval="'ir.actions.report.xml,'+str(aeroo_agreement)" name="value"/>
<field eval="True" name="isobject"/>
<field eval="True" name="replace"/>
<field name="domain">[('company_id', '!=', 1)]</field>
</ir_set>
Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi @Raffaele

It cannot be done without a tricky customization on the js classes. Also the last time I use the ir_set tag I saw that it doesn't update the related records that it create, so the first time you install it is the only time it works. I don't know if that remains likr that

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

Thank you a lot, you also confirm my suspects about the ir_set tag behaviour.

happy to help you

Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 3 21
8362
2
thg 9 23
5861
1
thg 4 23
3188
3
thg 3 22
9498
0
thg 2 17
4957