How to hide reports from print menu in odoo 14?

4.3k Views Asked by At

i created a report in odoo 14 but i want to trigger only from button so i want to hide from print menu ....

<record id="report_export_sale_order" model="ir.actions.report">
    <field name="name">Print Packing List</field>
    <field name="model">sale.order</field>
    <field name="report_type">qweb-pdf</field>
    <field name="report_name">sales_enhancement.report_export_so</field>
    <field name="report_file">sales_enhancement.report_export_so</field>
    <field name="binding_model_id" ref="model_sale_order"/>
    <field name="binding_type">report</field>
</record>
5

There are 5 best solutions below

0
On BEST ANSWER

it will hide by adding modify "binding_model_id" to False

<field name="binding_model_id" eval="False"/>
0
On

You can hide the report from the print menu using the Remove from the 'Print' menu button in the report form view which calls the unlink_action to set the binding_model_id to False.

1
On

For people who are using the report shortcut tag, you can use menu="False" attribute. This worked at least in previous Odoo versions:

<report id="action_report_custom
        string="Report"
        model="sale.order"
        report_type="qweb-pdf"
        file="custom_module.report_custom"
        name="custom_module.report_custom"
        print_report_name="'Report Custom - %s' % (object.name)"
        menu="False" />
0
On

just add the menu="False" in your report tag

0
On

in odoo 15 it will hide using this:

<field name="binding_model_id"></field>