[FIX] base: traceback on pdf read error
Create a vendor bill with a specific attachment (on ticket) Go to vendor bill list view Select the created bill and another one Print > Original Bills Traceback due to unhandled ValueError on pdf read opw-3498898 closes odoo/odoo#135320 X-original-commit: adf4c91f3f696ee849577e345d40e24d59d452f4 Signed-off-by: Julien Castiaux (juc) <juc@odoo.com> Signed-off-by: Andrea Grazioso (agr) <agr@odoo.com>
This commit is contained in:
@@ -652,7 +652,7 @@ class IrActionsReport(models.Model):
|
||||
try:
|
||||
reader = PdfFileReader(stream)
|
||||
writer.appendPagesFromReader(reader)
|
||||
except (PdfReadError, TypeError, NotImplementedError):
|
||||
except (PdfReadError, TypeError, NotImplementedError, ValueError):
|
||||
raise UserError(_("Odoo is unable to merge the generated PDFs."))
|
||||
result_stream = io.BytesIO()
|
||||
streams.append(result_stream)
|
||||
|
||||
Reference in New Issue
Block a user