summaryrefslogtreecommitdiff
path: root/odoo/cli/server.py
diff options
context:
space:
mode:
authorOlivier Dony <odo@odoo.com>2018-09-24 12:30:49 +0200
committerOlivier Dony <odo@odoo.com>2018-09-24 12:30:49 +0200
commitcb2862ad2a60ff4ce66c14e7af2548fdf6fc5961 (patch)
tree82c25b35be17d227689c7195e223fa5671cabf03 /odoo/cli/server.py
parent925fdbc683c546e096d1ae99aa22606480f78a0e (diff)
[IMP] core: require install mode for db bootstrap
The registry loading system should not alter databases unless it is asked to do so, by a module installation or update instruction. This property should hold true as well for database bootstrap, and this is what this commit changes.. In order to avoid any behavior change for command-line users, an implicit `-i base` is assumed when starting the server from the command-line with `-d <db>`, causing the db boostrap to happen if the database did not exist yet.
Diffstat (limited to 'odoo/cli/server.py')
-rw-r--r--odoo/cli/server.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/odoo/cli/server.py b/odoo/cli/server.py
index 8809cda542a..93f40126839 100644
--- a/odoo/cli/server.py
+++ b/odoo/cli/server.py
@@ -138,6 +138,7 @@ def main(args):
for db_name in preload:
try:
odoo.service.db._create_empty_database(db_name)
+ config['init']['base'] = True
except ProgrammingError as err:
if err.pgcode == errorcodes.INSUFFICIENT_PRIVILEGE:
# We use an INFO loglevel on purpose in order to avoid