From 05a8dc26fe296bfa4b6e6b0e6fd339a7fb01186f Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Thu, 17 Apr 2025 00:04:15 +0200 Subject: [PATCH] Do not skip other invoices when printing an invoice that has a cache Closes #13968 (grafted from ad22b11036a0227c9274b8525e026c60ae1e6d15) --HG-- branch : 7.0 --- modules/account_invoice/invoice.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/account_invoice/invoice.py b/modules/account_invoice/invoice.py index 5d8f7e4af4..bed85c0f50 100644 --- a/modules/account_invoice/invoice.py +++ b/modules/account_invoice/invoice.py @@ -1646,9 +1646,8 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin, InvoiceReportMixin): ''' InvoiceReport = Pool().get('account.invoice', type='report') for invoice in invoices: - if invoice.invoice_report_cache: - return - InvoiceReport.execute([invoice.id], {}) + if not invoice.invoice_report_cache: + InvoiceReport.execute([invoice.id], {}) def _credit(self, **values): '''