Skip to Content
Menu
This question has been flagged
1 Reply
3310 Views

Hello guys, I have been customizing the odoo sales report template. In my module, I have created my own custom report template. In report declaration part, I have two custom report template and one inherited sale report to hide it from the print dropdown.

Code

<?xml version="1.0" encoding="UTF-8"?>

<odoo>

        <data>

                <report 

            id="sale_template_action"

            string="Quotation/Order with PID"

            model="sale.order" 

            report_type="qweb-pdf"

            file="customization.custom_sale_report" 

            name="customization.custom_sale_report"

            print_report_name="(object.state in ('draft', 'sent') and 'Quotation - %s' % (object.name)) or 'Order - %s' % (object.name)"

        />

        <report 

            id="new_action_report_saleorder"

            string="Quotation/Order without PID"

            model="sale.order" 

            report_type="qweb-pdf"

            file="customization.custom_sale_report_without_pid" 

            name="customization.custom_sale_report_without_pid"

            print_report_name="(object.state in ('draft', 'sent') and 'Quotation - %s' % (object.name)) or 'Order - %s' % (object.name)"

            />

                <report 

            id="sale.action_report_saleorder"

            string="Quotation / Order"

            model="sale.order" 

            report_type="qweb-pdf"

            file="sale.report_saleorder" 

            name="sale.report_saleorder"

            print_report_name="(object.state in ('draft', 'sent') and 'Quotation - %s' % (object.name)) or 'Order - %s' % (object.name)"

            menu = "False" />

        </data>

</odoo>

As you can see that I have made sale.action_report_saleorder invisible from print dropdown whenever I install my module.
But the problem is whenever I uninstall my module, sale.action_report_saleorder does not appear back in sale print dropdown. But when I make menu = "True" in my module there appear 3 dropdown menu in the sale and also it gives sale.action_report_saleorder appear back whenever my module is uninstalled. 
So, how can I make sale.action_report_saleorder hidden in print dropdown when I install my module and get appeared whenever I uninstalled it. I have been stuck in it for so long. Help me out.
Avatar
Discard
Best Answer

Simply follow below steps,

- Go to setting and under the Technical section select the reporting

- under the reporting section find the your report and  activate the Remove from the "Print" menu button on top right corner.


Avatar
Discard
Related Posts Replies Views Activity
4
Oct 23
4489
5
Nov 24
30552
0
Aug 23
769
0
Feb 22
1114
2
Dec 21
7715