[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 <FlorianGilbert@users.noreply.github.com>
Signed-off-by: Hubert Van De Walle <hubvd@users.noreply.github.com>
This commit is contained in:
Hubert Van de Walle (huvw)
2021-08-24 12:56:28 +00:00
parent 3d6ebbb55e
commit 72b949b0e5
@@ -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)