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

Visibility of the reports (the section Reports - right side of the screen) on a company

By
Viorica Ibasfalean
on 3/12/13, 6:11 AM 696 views

I need help for the next issue (We use the version 6.1 ):

I have developed a new type of invoice according with our needs, the invoice is visible on Accounting -> Customers/Suppliers -> Customer Invoices/ Supplier Invoices, click on an invoice, the section Reports (right side of screen- reports without wizard) The link of invoice is memored in the table "ir_values", and the report is memored in the table "ir_act_report_xml". The report is not memored on the database, so I don't have any object , I can not use the Access Rules for some rights. I need to hide the report (or the link of report) for some company. I tried to use the attribute invisible, for eg. attrs="{'invisible':[('company_id','=','2')]}", but is not working (for buttons is working).

How should I modify the next code to hide the report for a company with name "RO" or any other name?

<openerp> <data noupdate="1">

<record id="p5_internal_invoice_md_id" model="ir.actions.report.xml">
    <field name="name">P5 Internal Invoice MD</field>
    <field name="type">ir.actions.report.xml</field>
    <field name="model">account.invoice</field>
    <field name="report_name">p5_internal_invoice_md</field>
    <field name="groups">base.group_hr_user</field>
    <field name="report_type">aeroo</field>
    <field name="in_format">oo-ods</field>
    <field name="out_format">5</field>
    <field name="parser_loc">p5_report_internal_invoice_md/report/invoice_parser.py</field>
    <field name="report_rml">p5_report_internal_invoice_md/report/internal_invoice_md.ods</field>
    <field name="parser_state">loc</field>
    <field name="tml_source">file</field>
    <field name="groups">base.group_hr_user</field>
</record>

<ir_set>
    <field eval="'action'" name="key"/>
    <field eval="'client_print_multi'" name="key2"/>
    <field eval="['account.invoice']" name="models"/>
    <field name="name">Internal Invoice MD T11</field>
    <field eval="'ir.actions.report.xml,'+str(p5_internal_invoice_md_id)" name="value"/>
    <field eval="True" name="isobject"/>
    <field eval="True" name="replace"/>
    <field eval ="False" name="menu"/>
</ir_set>

</data> </openerp>

Thank you very, very much for your answers!!!

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: 3/12/13, 6:11 AM
Seen: 696 times
Last updated: 3/16/15, 8:10 AM