Odoo Help

Welcome!

This community 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.

0

Show client_print_multi menu item based on domain

By
Raffaele
on 1/26/16, 9:12 AM 603 views

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>
1

Axel Mendoza

--Axel Mendoza--
10238
| 7 7 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full time employee trying to understand what to do an how

Reach me at aekroft@gmail.com

Axel Mendoza
On 1/26/16, 9:56 AM

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

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

Raffaele
on 1/27/16, 9:14 AM

happy to help you

Axel Mendoza
on 1/27/16, 10:48 AM

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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 1/26/16, 9:12 AM
Seen: 603 times
Last updated: 1/26/16, 9:56 AM