From 823ebc429bb2132125f743667eae1f1b922e5442 Mon Sep 17 00:00:00 2001 From: KENLYLST <9990448+KENLYLST@users.noreply.github.com> Date: Wed, 30 Dec 2020 01:42:33 +0100 Subject: [PATCH] [8.0][account_financial_report_webkit] Fix ``Type Error`` The separator in the [report_file](https://github.com/OCA/account-financial-reporting/blob/8.0/account_financial_report_webkit/report/report.xml#L122) path is hard-coded and the [create_single_pdf](https://github.com/OCA/account-financial-reporting/blob/8.0/account_financial_report_webkit/report/webkit_parser_header_fix.py#L211) will try to split the report file path using the system path separator which will lead to a type error when using a windows platform. The fix will replace the system path separator with the hard-coded separator. --- .../report/webkit_parser_header_fix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account_financial_report_webkit/report/webkit_parser_header_fix.py b/account_financial_report_webkit/report/webkit_parser_header_fix.py index 2766580d..bae12189 100644 --- a/account_financial_report_webkit/report/webkit_parser_header_fix.py +++ b/account_financial_report_webkit/report/webkit_parser_header_fix.py @@ -208,7 +208,7 @@ class HeaderFooterTextWebKitParser(webkit_report.WebKitParser): if report_xml.report_file: path = get_module_resource( - *report_xml.report_file.split(os.path.sep)) + *report_xml.report_file.split('/')) if os.path.exists(path): template = file(path).read() if not template and report_xml.report_webkit_data: