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>
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.