Thursday, August 7, 2025
1 change · saas-17.4
Resolved issues and error corrections
Uploading a damaged PDF as a quotation header or footer now shows a clear validation message instead of causing a system error. This helps sales users understand the file problem and continue working without an unexpected crash.
Original PR description
Currently, an error occurs when uploading a corrupted PDF as a quotation header or footer pages. Step to produce: - Install the ```sale_pdf_quote_builder``` module. - Navigate to Sales / Products / Product Variants. - Click on the Documents button, And create a new product document. - Add a name and upload a corrupted pdf file. - Click on 'Configure dynamic fields'. ```PdfReadError: Broken xref table``` An error occurs when the system tries to read file content through the PDF file reader at [1]. But the xref table of the pdf file is corrupted or broken. Link [1]: https://github.com/odoo/odoo/blob/1b1de50729c741d03b11d0fdc24cebf3df4b083a/addons/sale_pdf_quote_builder/utils.py#L27 To handle this issue, Add a try-except block to ensure that if an error occurs during the pdf file read it raises a validation error, Sentry-5879869841 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr