[FIX] contract: Proper cron execution on multi-company

The invoice generation was only done for the last company found, as it
was called outside the loop.
This commit is contained in:
Pedro M. Baeza
2022-05-04 21:07:48 +02:00
parent 12cc977ef4
commit 4f48467f71
2 changed files with 3 additions and 2 deletions

View File

@@ -9,7 +9,7 @@
{ {
'name': 'Contracts Management - Recurring', 'name': 'Contracts Management - Recurring',
'version': '10.0.4.3.1', 'version': '10.0.4.3.2',
'category': 'Contract Management', 'category': 'Contract Management',
'license': 'AGPL-3', 'license': 'AGPL-3',
'author': "OpenERP SA, " 'author': "OpenERP SA, "

View File

@@ -365,7 +365,8 @@ class AccountAnalyticAccount(models.Model):
('date_end', '=', False), ('date_end', '=', False),
('date_end', '>=', cutoffdate), ('date_end', '>=', cutoffdate),
]) ])
return contracts.recurring_create_invoice(limit) contracts.recurring_create_invoice(limit)
return True
@api.multi @api.multi
def action_contract_send(self): def action_contract_send(self):