3

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>
omar ahmed
  • 635
  • 5
  • 19

5 Answers5

5

it will hide by adding modify "binding_model_id" to False

<field name="binding_model_id" eval="False"/>
omar ahmed
  • 635
  • 5
  • 19
3

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.

Kenly
  • 24,317
  • 7
  • 44
  • 60
1

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" />
ChesuCR
  • 9,352
  • 5
  • 51
  • 114
1

in odoo 15 it will hide using this:

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

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