Monday, May 5, 2025
2 changes · saas-18.2
Resolved issues and error corrections
This fixes New Zealand invoice PDFs so they show only the correct document title when printed. It prevents confusing output where multiple possible invoice titles appeared on the same PDF.
Original PR description
### Steps to reproduce: - Install "l10n_nz" and switch company - Create an invoice - Click "Print" - On the generated PDF all possible document titles show ### Cause: This [commit](https://github.com/odoo/odoo/commit/af06243092fd194c993451ea9c165be9ec2b4188) changed the way the invoices title were displayed but it has a typo: it hasn't deleted the xpath like in `l10n_au` but added the change inside the xpath. ### Solution: Remove the xpath. opw-4710851
This fixes an issue where sending and printing a Hungarian invoice could fail if the company VAT number was not set, especially in demo NAV credential mode. Users can now complete the invoice send and print flow without encountering an unexpected error in that scenario.
Original PR description
When vat is unset in Company and user tries to send & print invoice, a traceback will appear. Steps to reproduce the error: - Install ``l10n_hu_edi`` module > Switch to ``HU Company`` - Open ``HU…
When vat is unset in Company and user tries to send & print invoice, a traceback will appear. Steps to reproduce the error: - Install ``l10n_hu_edi`` module > Switch to ``HU Company`` - Open ``HU Company`` > Unset vat field > Save - Go to Invoicing > Configuration > Settings > NAV Credentials > Mode: Demo > Save - Create a new invoice > Confirm > Send & Print > Send & Print Traceback: ``` QWebException: Error while render the template TypeError: argument of type 'bool' is not iterable Template: ir.ui.view(2872,) Path: /t/t[1]/base:taxpayerId Node: <ns0:taxpayerId xmlns:ns0="http://schemas.nav.gov.hu/OSA/3.0/base" t-out="vat[:8]"/> ``` https://github.com/odoo/odoo/blob/33b728c5917b06dd8ab46c48b160e3cf24ddc1ba/addons/l10n_hu_edi/models/res_company.py#L95-L96 For NAV Credentials(Mode: Demo), Credentials are not required. https://github.com/odoo/odoo/blob/33b728c5917b06dd8ab46c48b160e3cf24ddc1ba/addons/l10n_hu_edi/data/template_invoice.xml#L124-L131 When user unset the vat field , ``vat`` will be False. It will lead to the above traceback. sentry-6242690591 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr