Friday, January 9, 2026
1 change · saas-17.4
Resolved issues and error corrections
This update prevents crashes when users configure dynamic fields on product documents with empty, invalid, or non-PDF content. It adds clearer validation and hides the dynamic field setup option for URL-based documents, helping sales teams avoid confusing errors while preparing PDF quote content.
Original PR description
Currently, an error occurs when configuring dynamic fields in the product document and file content is empty or the URL which is given as a file content not valid. Step to produce: - Install the…
Currently, an error occurs when configuring dynamic fields in the product document and file content is empty or the URL which is given as a file content not valid. 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 set a type as URL and add an invalid URL with the right URL domains like https://xyz.odoo.com/. - Click on 'Configure dynamic fields'. ```EmptyFileError: Cannot read an empty file``` An error occurs when the system tries to read file content through the PDF file reader at [1]. But it is empty. Link [1]:https://github.com/odoo/odoo/blob/ce73a1e19f19526b59bde9cebe2751102e2d8b27/addons/sale_pdf_quote_builder/utils.py#L27 Add validation for file content on the product.document to only accept PDF file and also add a try-except block to raise a validation error if an error occurs during PDF file reading, Additionally hide the 'Configure Dynamic Fields' button if a type is set to 'URL'. Sentry-5795555265