diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-01-10 13:52:44 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-01-10 13:52:44 +0100 |
| commit | a2c1df8b9ca731107dd2d67cc0b2dd39d0c7ad64 (patch) | |
| tree | 5de4c414a1c137c674ca004fbec6a29fc1a10db5 /odoo/modules/loading.py | |
| parent | d38e00031f975db4a3d3e80250d5142444a3239b (diff) | |
| parent | 557feb950cb74656c92e59a62847c9e414c9b41f (diff) | |
[MERGE] forward port branch saas-14 up to 557feb950cb
Diffstat (limited to 'odoo/modules/loading.py')
| -rw-r--r-- | odoo/modules/loading.py | 8 |
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.') |
