Skip to content
Snippets Groups Projects
Commit b20e6896 authored by Goffin Simon's avatar Goffin Simon
Browse files

[FIX] account: Printing journal entries"


This commit ba32244c introduced an error when
validating pickings or reconciling

closes odoo/odoo#66331

Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
parent 3b59d0b1
No related branches found
No related tags found
No related merge requests found
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment