From d763e7e24b2564eb56f5f30db87bf92b4d8cf904 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phan=20Sainl=C3=A9ger?= Date: Thu, 19 May 2022 16:08:19 +0200 Subject: [PATCH] [UPD] Creation budget category Delivery --- .../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 9486f84..06a0854 100644 --- a/account_budget_forecast/models/account_analytic_account.py +++ b/account_budget_forecast/models/account_analytic_account.py @@ -32,6 +32,12 @@ class AccountAnalyticAccount(models.Model): domain=[("budget_category", "=", "subcontractors")], copy=True, ) + budget_forecast_delivery_ids = fields.One2many( + "budget.forecast", + "analytic_id", + domain=[("budget_category", "=", "delivery")], + copy=True, + ) budget_forecast_miscellaneous_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 92ed3cb..20daede 100644 --- a/account_budget_forecast/models/budget_forecast.py +++ b/account_budget_forecast/models/budget_forecast.py @@ -27,6 +27,7 @@ class BudgetForecast(models.Model): ("material", "Material"), ("equipment", "Equipment"), ("subcontractors", "Subcontractors"), + ("delivery", "Delivery"), ("miscellaneous", "Miscellaneous"), ("unplanned", "Unplanned"), ], diff --git a/account_budget_forecast/views/account_analytic_account_categories.xml b/account_budget_forecast/views/account_analytic_account_categories.xml index 5641fc8..d128991 100644 --- a/account_budget_forecast/views/account_analytic_account_categories.xml +++ b/account_budget_forecast/views/account_analytic_account_categories.xml @@ -115,6 +115,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +