From 00f18312bd2c29e653cb44bdb57030f1a3375b00 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Mon, 22 Aug 2016 13:11:11 +0200 Subject: [PATCH] [FIX] qweb: display a warning when try to use profiling without astor module --- openerp/addons/base/ir/ir_qweb/qweb.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openerp/addons/base/ir/ir_qweb/qweb.py b/openerp/addons/base/ir/ir_qweb/qweb.py index 27784915026..dbffde9f1e9 100644 --- a/openerp/addons/base/ir/ir_qweb/qweb.py +++ b/openerp/addons/base/ir/ir_qweb/qweb.py @@ -372,6 +372,9 @@ class QWeb(object): def _profiling(self, astmod, options): """ Add profiling code into the givne module AST. """ + if not astor: + _logger.warning("Please install astor to display the code profiling") + return code_line = astor.to_source(astmod) # code = $code_lines.split(u"\n")