Skip to content
Snippets Groups Projects
Commit 277f531bfe12 authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

:ambulance: use correct configuration file in odoo 11 or 12 when binding to...

:ambulance: use correct configuration file in odoo 11 or 12 when binding to local configuration file
parent f5a0bc01343e
No related branches found
No related tags found
No related merge requests found
......@@ -32,5 +32,5 @@
_logger = logging.getLogger(__name__)
__version__ = '1.1.7'
__version__ = '1.1.8'
__date__ = '2017-08-11'
......@@ -36,5 +36,5 @@
__date__ = '2017-08-11'
__updated__ = '2018-08-30'
__updated__ = '2018-10-17'
def which(program):
......@@ -468,9 +468,13 @@
user = db_user
password = db_password
if os.path.isfile(local_conf_path):
_logger.info('Local configuration file found: %s' % local_conf_path)
binds.append('%s:/opt/odoo/etc' % os.path.join(
project_path, local_conf_dir))
_logger.info('Local configuration file found: %s', local_conf_path)
odoo_conf_path = (
'/etc/odoo' if odoo_type in ('11.0', '12.0')
else '/opt/odoo/etc'
)
binds.append('{}:{}'.format(os.path.join(
project_path, local_conf_dir), odoo_conf_path))
cp_local = ConfigParser()
cp_local.read(local_conf_path)
if not user:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment