summaryrefslogtreecommitdiff
path: root/addons/base_import_module
diff options
context:
space:
mode:
authorDenis Ledoux <dle@odoo.com>2015-11-06 12:03:35 +0100
committerDenis Ledoux <dle@odoo.com>2015-11-06 12:03:35 +0100
commit384b8d496dac02b9eac783828a1deb2c7f9b6731 (patch)
tree0663de57bd784701b0c4bf0cc77248065ef75cf6 /addons/base_import_module
parentea2c80cad018da6390ea9d116733de691907e1e4 (diff)
[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
Diffstat (limited to 'addons/base_import_module')
-rw-r--r--addons/base_import_module/models/ir_module.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/base_import_module/models/ir_module.py b/addons/base_import_module/models/ir_module.py
index d412ae148f3..df5587569ff 100644
--- a/addons/base_import_module/models/ir_module.py
+++ b/addons/base_import_module/models/ir_module.py
@@ -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():