Browse Source

[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.
pull/747/head
KENLYLST 4 years ago
committed by GitHub
parent
commit
823ebc429b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      account_financial_report_webkit/report/webkit_parser_header_fix.py

2
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:

Loading…
Cancel
Save