diff --git a/invoice.py b/invoice.py index 11a3ffb759..c8a112440e 100644 --- a/invoice.py +++ b/invoice.py @@ -2123,7 +2123,7 @@ class InvoiceReport(Report): # invoice_report_cache there was an error somewhere. So we save it now # in invoice_report_cache if invoice.state in ('open', 'paid'): - Invoice.write([invoice], { + Invoice.write([Invoice(invoice.id)], { 'invoice_report_format': res[0], 'invoice_report_cache': res[1], })