From 1052e36d7c43c80260ab4710dd7dc8a0a85dc02c Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Mon, 13 Feb 2012 18:35:14 +0100 Subject: [PATCH] [FIX] report_webkit: Use the parent of the root_path if we use openerp on Windows bzr revid: stw@openerp.com-20120213173514-vj6mqv9qrqs0y7k6 --- addons/report_webkit/webkit_report.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/report_webkit/webkit_report.py b/addons/report_webkit/webkit_report.py index 90a35db10dd..0d9f2dd6c4c 100644 --- a/addons/report_webkit/webkit_report.py +++ b/addons/report_webkit/webkit_report.py @@ -83,7 +83,9 @@ class WebKitParser(report_sxw): defpath = os.environ.get('PATH', os.defpath).split(os.pathsep) if hasattr(sys, 'frozen'): defpath.append(os.getcwd()) - webkit_path = tools.which('wkhtmltopdf', path=os.path.join(defpath)) + if tools.config['root_path']: + defpath.append(os.path.dirname(tools.config['root_path'])) + webkit_path = tools.which('wkhtmltopdf', path=os.pathsep.join(defpath)) except IOError: webkit_path = None