[FIX] report_webkit: Use the parent of the root_path if we use openerp on Windows

bzr revid: stw@openerp.com-20120213173514-vj6mqv9qrqs0y7k6
This commit is contained in:
Stephane Wirtel
2012-02-13 18:35:14 +01:00
parent 586b3ae7c1
commit 1052e36d7c
+3 -1
View File
@@ -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