diff --git a/account_budget_forecast/__manifest__.py b/account_budget_forecast/__manifest__.py index 86fbacc..2158eab 100644 --- a/account_budget_forecast/__manifest__.py +++ b/account_budget_forecast/__manifest__.py @@ -3,7 +3,7 @@ { "name": "account_budget_forecast", - "version": "13.0.1.2.0", + "version": "13.0.1.3.0", "author": "Elabore", "maintainer": "False", "website": "False", diff --git a/account_budget_forecast/models/budget_forecast.py b/account_budget_forecast/models/budget_forecast.py index 896178d..e4c7cc0 100644 --- a/account_budget_forecast/models/budget_forecast.py +++ b/account_budget_forecast/models/budget_forecast.py @@ -290,6 +290,21 @@ class BudgetForecast(models.Model): record.plan_amount_with_coeff = record.plan_amount_without_coeff * ( 1 + record.analytic_id.global_coeff ) + modulo = record.plan_amount_with_coeff % 100 + if (modulo > 0) and (modulo < 25): + record.plan_amount_with_coeff = record.plan_amount_with_coeff - modulo + elif (modulo >= 25) and (modulo < 50): + record.plan_amount_with_coeff = record.plan_amount_with_coeff + ( + 50 - modulo + ) + elif (modulo > 50) and (modulo < 75): + record.plan_amount_with_coeff = record.plan_amount_with_coeff - ( + modulo - 50 + ) + elif (modulo >= 75) and (modulo < 100): + record.plan_amount_with_coeff = record.plan_amount_with_coeff + ( + 100 - modulo + ) @api.depends("child_ids") def _calc_plan_qty(self):