|
@ -312,7 +312,7 @@ class AccountAnalyticAccount(models.Model): |
|
|
return invoices |
|
|
return invoices |
|
|
|
|
|
|
|
|
@api.model |
|
|
@api.model |
|
|
def cron_recurring_create_invoice(self): |
|
|
|
|
|
|
|
|
def cron_recurring_create_invoice(self, limit=None): |
|
|
today = fields.Date.today() |
|
|
today = fields.Date.today() |
|
|
contracts = self.with_context(cron=True).search([ |
|
|
contracts = self.with_context(cron=True).search([ |
|
|
('recurring_invoices', '=', True), |
|
|
('recurring_invoices', '=', True), |
|
@ -320,7 +320,7 @@ class AccountAnalyticAccount(models.Model): |
|
|
'|', |
|
|
'|', |
|
|
('date_end', '=', False), |
|
|
('date_end', '=', False), |
|
|
('date_end', '>=', today), |
|
|
('date_end', '>=', today), |
|
|
]) |
|
|
|
|
|
|
|
|
], limit=limit) |
|
|
return contracts.recurring_create_invoice() |
|
|
return contracts.recurring_create_invoice() |
|
|
|
|
|
|
|
|
@api.multi |
|
|
@api.multi |
|
|