summaryrefslogtreecommitdiff
path: root/odoo/modules/loading.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2017-01-06 18:06:14 +0100
committerChristophe Simonis <chs@odoo.com>2017-01-06 18:06:14 +0100
commit98c71b23d355cca207ce65a6e3a02b292b54a4ba (patch)
tree5e842e841797162f0c735be54bb49f3e413b5cbf /odoo/modules/loading.py
parent100077f035b9893111ebb40dc971a0733ffec955 (diff)
parent9073ecb6f59e1834bdd5e1aed96d6be4b03b00d5 (diff)
[MERGE] forward port branch saas-11 up to 9073ecb6f59
Diffstat (limited to 'odoo/modules/loading.py')
-rw-r--r--odoo/modules/loading.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/odoo/modules/loading.py b/odoo/modules/loading.py
index 7841b23fd0e..e9744844841 100644
--- a/odoo/modules/loading.py
+++ b/odoo/modules/loading.py
@@ -364,7 +364,7 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
for (model,) in cr.fetchall():
if model in registry:
env[model]._check_removed_columns(log=True)
- else:
+ elif _logger.isEnabledFor(logging.INFO): # more an info that a warning...
_logger.warning("Model %s is declared but cannot be loaded! (Perhaps a module was partially removed or renamed)", model)
# Cleanup orphan records
@@ -402,8 +402,10 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
if update_module:
View = env['ir.ui.view']
for model in registry:
- if not View._validate_custom_views(model):
- _logger.warning('invalid custom view(s) for model %s', model)
+ try:
+ View._validate_custom_views(model)
+ except Exception as e:
+ _logger.warning('invalid custom view(s) for model %s: %s', model, tools.ustr(e))
if report.failures:
_logger.error('At least one test failed when loading the modules.')