Skip to content

Commit 12ffb13

Browse files
committed
[IMP] edi_exchange_template_oca: prettify xml output
1 parent fea6c93 commit 12ffb13

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

edi_exchange_template_oca/models/edi_exchange_template_output.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ def _post_process_output(self, output):
121121
return output
122122

123123
def _prettify_xml(self, xml_string):
124-
return etree.tostring(etree.fromstring(xml_string), pretty_print=True)
124+
parser = etree.XMLParser(remove_blank_text=True)
125+
xml_tree = etree.fromstring(xml_string, parser)
126+
return etree.tostring(xml_tree, pretty_print=True)
125127

126128
def _get_info_provider(self, exchange_record, work_ctx=None, usage=None, **kw):
127129
"""Retrieve component providing info to render a template.

0 commit comments

Comments
 (0)