تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
4273 أدوات العرض

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.
الصورة الرمزية
إهمال
أفضل إجابة

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.


الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
4
أكتوبر 23
5776
5
نوفمبر 24
32114
0
أغسطس 23
1640
0
فبراير 22
1845
2
ديسمبر 21
9093