Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
4289 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
4
ott 23
5789
5
nov 24
32143
0
ago 23
1642
0
feb 22
1853
2
dic 21
9111