[FIX] contract: invoice message create

This commit is contained in:
Marcel Savegnago
2022-10-07 12:26:57 -03:00
parent 296457edb6
commit 0a9b992cbb

View File

@@ -565,8 +565,8 @@ class ContractContract(models.Model):
This method triggers the creation of the next invoices of the contracts This method triggers the creation of the next invoices of the contracts
even if their next invoicing date is in the future. even if their next invoicing date is in the future.
""" """
invoice = self._recurring_create_invoice() invoices = self._recurring_create_invoice()
if invoice: for invoice in invoices:
self.message_post( self.message_post(
body=_( body=_(
"Contract manually invoiced: " "Contract manually invoiced: "
@@ -575,7 +575,7 @@ class ContractContract(models.Model):
) )
% (invoice._name, invoice.id) % (invoice._name, invoice.id)
) )
return invoice return invoices
@api.model @api.model
def _invoice_followers(self, invoices): def _invoice_followers(self, invoices):