[MERGE] [FIX] correct path for printing webkit reports on windows server, courtesy of Olivier Laurent (Acsone)

lp bug: https://launchpad.net/bugs/1159702 fixed

bzr revid: mat@openerp.com-20130604084631-pv3echfj33qatqug
This commit is contained in:
Martin Trigaux 2013-06-04 10:46:31 +02:00
commit b7fb321f5b
1 changed files with 3 additions and 1 deletions

View File

@ -219,7 +219,9 @@ class WebKitParser(report_sxw):
template = False
if report_xml.report_file :
path = addons.get_module_resource(*report_xml.report_file.split(os.path.sep))
# backward-compatible if path in Windows format
report_path = report_xml.report_file.replace("\\", "/")
path = addons.get_module_resource(*report_path.split('/'))
if path and os.path.exists(path) :
template = file(path).read()
if not template and report_xml.report_webkit_data :