From 384b8d496dac02b9eac783828a1deb2c7f9b6731 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Fri, 6 Nov 2015 12:03:35 +0100 Subject: [PATCH] [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 --- addons/base_import_module/models/ir_module.py | 1 + 1 file changed, 1 insertion(+) 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():