From 6b3d23206f17f435797e107045cea3ff70e36769 Mon Sep 17 00:00:00 2001 From: Carolina Fernandez Date: Mon, 9 Oct 2023 12:17:47 -0300 Subject: [PATCH] [16.0][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 ecaeee56b..260906e98 100644 --- a/contract/models/contract.py +++ b/contract/models/contract.py @@ -580,8 +580,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: " @@ -596,7 +596,7 @@ class ContractContract(models.Model): "rec_id": invoice.id, } ) - return invoice + return invoices @api.model def _invoice_followers(self, invoices):