[FIX] base_import_module: exception logger for module imports

When importing a module, if an error was raised
during the import, the traceback wasn't displayed
anywhere, making harder the debugging.

While it make sense to not display the entire traceback
to the user, in the web client, this is useful to
diplay the traceback in the logs, for debugging purposes.

opw-653882
This commit is contained in:
Denis Ledoux 2015-11-06 12:03:35 +01:00
parent ea2c80cad0
commit 384b8d496d
1 changed files with 1 additions and 0 deletions

View File

@ -102,6 +102,7 @@ class view(osv.osv):
self.import_module(cr, uid, mod_name, path, force=force, context=context)
success.append(mod_name)
except Exception, e:
_logger.exception('Error while importing module')
errors[mod_name] = tools.ustr(e)
r = ["Successfully imported module '%s'" % mod for mod in success]
for mod, error in errors.items():