[IMP] - add an option to enable forecasts by company

This commit is contained in:
sbejaoui
2020-10-07 15:46:16 +02:00
parent 4db5c90a1d
commit 2b7e1f07d2
7 changed files with 79 additions and 4 deletions

View File

@@ -37,6 +37,7 @@ class ContractContract(models.Model):
]
):
for rec in self:
for contract_line in rec.contract_line_ids:
contract_line.with_delay()._generate_forecast_periods()
if rec.company_id.enable_contract_forecast:
for contract_line in rec.contract_line_ids:
contract_line.with_delay()._generate_forecast_periods()
return res