summaryrefslogtreecommitdiff
path: root/odoo/modules/loading.py
diff options
context:
space:
mode:
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.')