Odoo Help


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

Viorica Ibasfalean
on 3/12/13, 6:11 AM 1,032 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>

    <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"/>

</data> </openerp>

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

About This Community

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


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 3/12/13, 6:11 AM
Seen: 1032 times
Last updated: 3/16/15, 8:10 AM