From 82c5e297f743fb52cdf0f4c8dceafe243d135cf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phan=20Sainl=C3=A9ger?= Date: Thu, 19 May 2022 12:28:35 +0200 Subject: [PATCH] [UPD] Creation budget category Unplanned --- .../models/account_analytic_account.py | 6 +++++ .../models/budget_forecast.py | 1 + .../account_analytic_account_categories.xml | 27 +++++++++++++++++++ 3 files changed, 34 insertions(+) diff --git a/account_budget_forecast/models/account_analytic_account.py b/account_budget_forecast/models/account_analytic_account.py index 2dfbbc1..9486f84 100644 --- a/account_budget_forecast/models/account_analytic_account.py +++ b/account_budget_forecast/models/account_analytic_account.py @@ -38,6 +38,12 @@ class AccountAnalyticAccount(models.Model): domain=[("budget_category", "=", "miscellaneous")], copy=True, ) + budget_forecast_unplanned_ids = fields.One2many( + "budget.forecast", + "analytic_id", + domain=[("budget_category", "=", "unplanned")], + copy=True, + ) project_section_budget_ids = fields.One2many( "budget.forecast", "analytic_id", diff --git a/account_budget_forecast/models/budget_forecast.py b/account_budget_forecast/models/budget_forecast.py index 12c2083..fce0912 100644 --- a/account_budget_forecast/models/budget_forecast.py +++ b/account_budget_forecast/models/budget_forecast.py @@ -28,6 +28,7 @@ class BudgetForecast(models.Model): ("equipment", "Equipment"), ("subcontractors", "Subcontractors"), ("miscellaneous", "Miscellaneous"), + ("unplanned", "Unplanned"), ], string=_("Budget Category"), ) diff --git a/account_budget_forecast/views/account_analytic_account_categories.xml b/account_budget_forecast/views/account_analytic_account_categories.xml index afd9a20..5641fc8 100644 --- a/account_budget_forecast/views/account_analytic_account_categories.xml +++ b/account_budget_forecast/views/account_analytic_account_categories.xml @@ -142,6 +142,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +