[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
'
This commit is contained in:
Yannick Tivisse
2016-11-21 17:03:50 +01:00
parent 0ad4faffeb
commit 2757b82ef8
+5
View File
@@ -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 {