From 2757b82ef8c36c8e7b4e7ba66f721e89008145ac Mon Sep 17 00:00:00 2001 From: Yannick Tivisse Date: Mon, 21 Nov 2016 17:00:32 +0100 Subject: [PATCH] [FIX] account: Enable 'Analytic Accounting' group if 'Budget Management' is enabled There is no way to use Budgets without Analytics, so it should be enabled at the same time with the option 'module_account_budget ' --- addons/account/models/res_config.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/account/models/res_config.py b/addons/account/models/res_config.py index be03ef03a0f..a6c806b20b0 100644 --- a/addons/account/models/res_config.py +++ b/addons/account/models/res_config.py @@ -265,6 +265,11 @@ class AccountConfigSettings(models.TransientModel): if self.group_analytic_accounting: self.module_account_accountant = True + @api.onchange('module_account_budget') + def onchange_module_account_budget(self): + if self.module_account_budget: + self.group_analytic_accounting = True + @api.multi def open_company(self): return {