From 0a9b992cbb6f533e3755974d2e6b1b7b1a468e27 Mon Sep 17 00:00:00 2001 From: Marcel Savegnago Date: Fri, 7 Oct 2022 12:26:57 -0300 Subject: [PATCH] [FIX] contract: invoice message create --- contract/models/contract.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contract/models/contract.py b/contract/models/contract.py index 5eb58479f..ede2bff89 100644 --- a/contract/models/contract.py +++ b/contract/models/contract.py @@ -565,8 +565,8 @@ class ContractContract(models.Model): This method triggers the creation of the next invoices of the contracts even if their next invoicing date is in the future. """ - invoice = self._recurring_create_invoice() - if invoice: + invoices = self._recurring_create_invoice() + for invoice in invoices: self.message_post( body=_( "Contract manually invoiced: " @@ -575,7 +575,7 @@ class ContractContract(models.Model): ) % (invoice._name, invoice.id) ) - return invoice + return invoices @api.model def _invoice_followers(self, invoices):