Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client_print_multi report disregards groups access limitation when printed directly to printer #68

Open
a0c opened this issue Oct 26, 2015 · 0 comments

Comments

@a0c
Copy link
Contributor

a0c commented Oct 26, 2015

Access to a print report can be limited to certain groups using groups_id like this:

        <record id="quant_label" model="ir.actions.report.xml">
            <field name="name">Label</field>
            <field name="model">stock.quant</field>
            <field name="type">ir.actions.report.xml</field>
            <field name="groups_id" eval="[(4, ref('stock.group_stock_user'))]"/>
            <field name="report_name">quant_label</field>
            <field name="report_type">aeroo</field>
            <field name="in_format">oo-odt</field>
            <field name='out_format' eval="ref('report_aeroo.report_mimetypes_pdf_odt')"/>
            <field name="report_rml">my_module/report/template_quant_label.odt</field>
            <field name="parser_state">default</field>
            <field name="tml_source">file</field>
        </record>
        <record model="ir.values" id="quant_label_values">
            <field name="name">Label</field>
            <field name="key2">client_print_multi</field>
            <field name="model">stock.quant</field>
            <field name="value" eval="'ir.actions.report.xml,' + str(ref('quant_label'))"/>
        </record>

However, once you redirect this report to a printer using report_aeroo_direct_print module, report becomes visible to all users (incl. Portal) as Print > Label , thus effectively disregarding groups_id field.

Expected behavior

Report should be, both, printed directly to printer and be visible as a Print > Label menu, but only to the specified group of users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant