Unlinking of existing report actions _may_ be better off in this repository
Closed this issue · 1 comments
PeterAlabaster commented
As part of a customer specific project with this repo layered underneath it, we removed existing core odoo report actions from the print menu.
It may be better off being in this repo however as anybody who installs UK Reports should want the existing actions removed. Is this an appropriate assumption?
The basic concept was an xml function call to ir.actions.report.xml:
from odoo import models, api
class IrActionsReportXml(models.Model):
_inherit = "ir.actions.report.xml"
@api.model
def unlink_report_actions(self):
report_ext_ids = [
'purchase.action_report_purchase_order',
'purchase.report_purchase_quotation',
'sale.report_sale_order',
'account.account_invoice_action_report_duplicate',
'account.account_invoices',
'stock.action_report_delivery',
'stock.action_report_picking',
]
for report_ext_id in report_ext_ids:
self.env.ref(report_ext_id).unlink_action()
StuartJMackintosh commented
Yes, if the UK stationary is installed, the generic Odoo reports should not be available on the print menu, and the UK Stationary should be the default when the buttons are pressed.