summaryrefslogtreecommitdiff
path: root/odoo/modules/loading.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2017-08-24 13:17:53 +0200
committerChristophe Simonis <chs@odoo.com>2017-08-24 13:17:53 +0200
commit017ee5eab376b4f09beb62812c1cbc682009ed86 (patch)
tree2af185b0604cd8ce9129c39137bbf39d21d7be89 /odoo/modules/loading.py
parent006c16198f7f68c9dc8b895defd013f33008840a (diff)
parent877e7098719195ed2934fc9c3b5c3bd8ad8bab07 (diff)
[MERGE] forward port branch saas-17 up to 877e7098719
Diffstat (limited to 'odoo/modules/loading.py')
-rw-r--r--odoo/modules/loading.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/odoo/modules/loading.py b/odoo/modules/loading.py
index bd58376a7b9..c06c219f7eb 100644
--- a/odoo/modules/loading.py
+++ b/odoo/modules/loading.py
@@ -20,7 +20,6 @@ import odoo.tools as tools
from odoo import api, SUPERUSER_ID
from odoo.modules.module import adapt_version, initialize_sys_path, load_openerp_module
-from odoo.tools import pycompat
_logger = logging.getLogger(__name__)
_test_logger = logging.getLogger('odoo.tests')
@@ -298,13 +297,13 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
_check_module_names(cr, itertools.chain(tools.config['init'], tools.config['update']))
- module_names = [k for k, v in pycompat.items(tools.config['init']) if v]
+ module_names = [k for k, v in tools.config['init'].items() if v]
if module_names:
modules = Module.search([('state', '=', 'uninstalled'), ('name', 'in', module_names)])
if modules:
modules.button_install()
- module_names = [k for k, v in pycompat.items(tools.config['update']) if v]
+ module_names = [k for k, v in tools.config['update'].items() if v]
if module_names:
modules = Module.search([('state', '=', 'installed'), ('name', 'in', module_names)])
if modules:
@@ -392,7 +391,7 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
getattr(py_module, uninstall_hook)(cr, registry)
Module = env['ir.module.module']
- Module.browse(pycompat.values(modules_to_remove)).module_uninstall()
+ Module.browse(modules_to_remove.values()).module_uninstall()
# Recursive reload, should only happen once, because there should be no
# modules to remove next time
cr.commit()
@@ -415,7 +414,7 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
_logger.info('Modules loaded.')
# STEP 8: call _register_hook on every model
- for model in pycompat.values(env):
+ for model in env.values():
model._register_hook()
# STEP 9: save installed/updated modules for post-install tests