From b20e689659a3e1c89279caf028592bf18a17c4f7 Mon Sep 17 00:00:00 2001
From: Goffin Simon <sig@odoo.com>
Date: Wed, 17 Feb 2021 09:56:39 +0000
Subject: [PATCH] [FIX] account: Printing journal entries"

This commit ba32244c10396ff8605e5533e08675a64fbf9d88 introduced an error when
validating pickings or reconciling

closes odoo/odoo#66331

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
---
 addons/account/models/ir_actions_report.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/addons/account/models/ir_actions_report.py b/addons/account/models/ir_actions_report.py
index 947bec15fb64..a00f2e430a62 100644
--- a/addons/account/models/ir_actions_report.py
+++ b/addons/account/models/ir_actions_report.py
@@ -12,8 +12,6 @@ class IrActionsReport(models.Model):
             if record.message_main_attachment_id.mimetype == 'application/pdf' or \
                record.message_main_attachment_id.mimetype.startswith('image'):
                 return record.message_main_attachment_id
-        if self.report_name in ('account.report_invoice_with_payments', 'account.report_invoice') and not record.is_invoice():
-            raise UserError(_("Only invoices could be printed."))
         return super(IrActionsReport, self).retrieve_attachment(record)
 
     def _post_pdf(self, save_in_attachment, pdf_content=None, res_ids=None):
-- 
GitLab