From 5a7452a4105efe93ce868031ba0637a684374c28 Mon Sep 17 00:00:00 2001 From: Kunjal Date: Thu, 3 May 2018 18:23:27 +0530 Subject: [PATCH] [FIX]: Improved branch. --- addons/base_branch_company/__manifest__.py | 2 +- .../models/ir_branch_company.py | 7 +++++++ .../views/res_branch_config_view.xml | 16 ++++++++++------ 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/addons/base_branch_company/__manifest__.py b/addons/base_branch_company/__manifest__.py index a3058720..844aab81 100644 --- a/addons/base_branch_company/__manifest__.py +++ b/addons/base_branch_company/__manifest__.py @@ -21,7 +21,7 @@ Main Features """, 'website': '', - 'depends': ['base'], + 'depends': ['base', 'base_setup'], 'data': [ 'demo/branch_data.xml', 'wizard/branch_config_view.xml', diff --git a/addons/base_branch_company/models/ir_branch_company.py b/addons/base_branch_company/models/ir_branch_company.py index 7b355b2b..e9d54bb7 100644 --- a/addons/base_branch_company/models/ir_branch_company.py +++ b/addons/base_branch_company/models/ir_branch_company.py @@ -13,3 +13,10 @@ class IrBranchCompanyMixin(models.AbstractModel): company_id = fields.Many2one( 'res.company', 'Company', ondelete="restrict", default=lambda self: self.env.user.company_id) + + +class ResConfigSettings(models.TransientModel): + + _inherit = 'res.config.settings' + + group_multi_branch = fields.Boolean("Multi Branch", implied_group='base_branch_company.group_multi_branch') diff --git a/addons/base_branch_company/views/res_branch_config_view.xml b/addons/base_branch_company/views/res_branch_config_view.xml index 87b422f7..05d048b6 100644 --- a/addons/base_branch_company/views/res_branch_config_view.xml +++ b/addons/base_branch_company/views/res_branch_config_view.xml @@ -4,28 +4,32 @@ res.config.settings.view.form.inherit.base.setup res.config.settings - + - -
+

Multi-Branch

-
+
+
+ +
-