summaryrefslogtreecommitdiff
path: root/odoo/cli/server.py
diff options
context:
space:
mode:
authorLaurent Contzen <lco@odoo.com>2019-04-11 09:48:35 +0000
committerChristophe Simonis <chs@odoo.com>2019-08-05 12:21:00 +0000
commitbbb1a8f151b07d0125fc6d7d89375aa22681aac5 (patch)
treebf5ccedb87685b8901ad30c10742a1ae7c4adcd6 /odoo/cli/server.py
parent6edb18be0d58a77c760668c006307ddf7dfd4935 (diff)
[IMP] ORM: Add new --upgrades-paths CLI option
This commit adds a new way to use upgrades scripts folders whithout needing to symlink them to an hardcoded path. The folders specified in --upgrades-paths is then being used by migration.py to find and execute migrations scripts per module specified in the -u CLI option. The folder needs to have the following structure: - <upgrades_paths folder 1> - <module1 name> - <version1> - <script1> - <script2> - ... - <scriptn> - <version2> - <scripts> - <module2 name> - <versions> - <scripts> - ... - <upgrades_paths folder 2> - ... Update odoo/tools/config.py Co-Authored-By: Olivier Dony <odony@users.noreply.github.com>
Diffstat (limited to 'odoo/cli/server.py')
-rw-r--r--odoo/cli/server.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/odoo/cli/server.py b/odoo/cli/server.py
index 93f40126839..fcb7f2de700 100644
--- a/odoo/cli/server.py
+++ b/odoo/cli/server.py
@@ -60,6 +60,8 @@ def report_configuration():
if os.path.isfile(config.rcfile):
_logger.info("Using configuration file at " + config.rcfile)
_logger.info('addons paths: %s', odoo.modules.module.ad_paths)
+ if config.get('upgrades_paths'):
+ _logger.info('upgrades path: %s', config['upgrades_paths'])
host = config['db_host'] or os.environ.get('PGHOST', 'default')
port = config['db_port'] or os.environ.get('PGPORT', 'default')
user = config['db_user'] or os.environ.get('PGUSER', 'default')