From 72b949b0e5c0c59e9cdff13323b4b3bfd6accf37 Mon Sep 17 00:00:00 2001 From: "Hubert Van de Walle (huvw)" Date: Tue, 24 Aug 2021 09:23:21 +0000 Subject: [PATCH] [REV] account: revert b324ba12b4af2d00c696bc5c42896c7c431d863c It was preventing custom reports from being printed opw-2625480 closes odoo/odoo#75522 X-original-commit: c9f5a502ab9b7436700c603c3330b715a3179ea1 Signed-off-by: Florian Gilbert Signed-off-by: Hubert Van De Walle --- addons/account/models/ir_actions_report.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/addons/account/models/ir_actions_report.py b/addons/account/models/ir_actions_report.py index eee5f8953b1..27deaa9fe7e 100644 --- a/addons/account/models/ir_actions_report.py +++ b/addons/account/models/ir_actions_report.py @@ -33,9 +33,3 @@ class IrActionsReport(models.Model): if attachment: attachment.register_as_main_attachment(force=False) return res - - @api.model - def render_qweb_pdf(self, res_ids=None, data=None): - if self.model == 'account.move' and any(not m.is_invoice(include_receipts=True) for m in self.env[self.model].browse(res_ids)): - raise UserError(_("Only invoices could be printed.")) - return super(IrActionsReport, self).render_qweb_pdf(res_ids, data)