From e34712d7b5041b6c0fca0221d71f68f8440edabc Mon Sep 17 00:00:00 2001 From: Julien Van Roy Date: Thu, 15 Dec 2022 11:02:33 +0000 Subject: [PATCH] [FIX] l10n_au: fix traceback when printing a pdf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When installing l10n_au, printing a PDF from any invoice will raise a UserError (this one: https://github.com/odoo/odoo/blob/16.0/odoo/addons/base/models/ir_actions_report.py#L699). Indeed, the content of the PDF is empty. Because no qweb report is called since on line https://github.com/odoo/odoo/blob/16.0/addons/account/views/report_invoice.xml#L335, the t-if is falsy. Indeed, the `o._get_name_invoice_report()` returns `l10n_au.report_invoice_document` since the l10n_au was made primary in https://github.com/odoo/odoo/commit/5079ace74958d4acd54d24a95579289a2eda92f1. To solve that, we need to inherit the `report_invoice_with_payments` template in l10n_au, change the name in the `t-if` and call the `l10n_au` report. closes odoo/odoo#108081 X-original-commit: ab221bccc8cc7484efb56d3b1f620031b120f193 Signed-off-by: William André (wan) Signed-off-by: Julien Van Roy --- addons/l10n_au/views/report_invoice.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/addons/l10n_au/views/report_invoice.xml b/addons/l10n_au/views/report_invoice.xml index 51588b4669e..3ef06edc2dd 100644 --- a/addons/l10n_au/views/report_invoice.xml +++ b/addons/l10n_au/views/report_invoice.xml @@ -1,5 +1,19 @@ + + + +