mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[13.0][FIX] contract: Recompute recurring next date
After invoice creation, the recurring next date has to be recomputed in order to get good values
This commit is contained in:
committed by
Pedro M. Baeza
parent
cd086ddbb4
commit
3a5ec60fd4
@@ -465,7 +465,9 @@ class ContractContract(models.Model):
|
||||
|
||||
def _recurring_create_invoice(self, date_ref=False):
|
||||
invoices_values = self._prepare_recurring_invoices_values(date_ref)
|
||||
return self.env["account.move"].create(invoices_values)
|
||||
moves = self.env["account.move"].create(invoices_values)
|
||||
self._compute_recurring_next_date()
|
||||
return moves
|
||||
|
||||
@api.model
|
||||
def cron_recurring_create_invoice(self, date_ref=None):
|
||||
|
||||
Reference in New Issue
Block a user