Quitar declaración de enconding en XML de cancelación

This commit is contained in:
El Mau 2022-01-24 12:04:26 -06:00
parent 01ccbcabd5
commit c09a5749da
2 changed files with 4 additions and 3 deletions

View File

@ -184,8 +184,9 @@ class SATCertificate(object):
# ~ node = xmlsec.tree.find_node(tree, 'Modulus')
# ~ node.text = node.text.replace('\n', '')
xml_signed = ET.tostring(tree,
xml_declaration=True, encoding='UTF-8').decode()
# ~ xml_signed = ET.tostring(tree,
# ~ xml_declaration=True, encoding='UTF-8').decode()
xml_signed = ET.tostring(tree, encoding='UTF-8').decode()
return xml_signed

View File

@ -799,7 +799,7 @@ def cancel_xml_sign(invoice, args, auth, certificado):
template = TEMPLATE_CANCEL.format(**data)
tree = ET.fromstring(template.encode())
sign_xml = cert.sign_xml(tree)
# ~ print(sign_xml)
print(sign_xml)
result = pac.cancel_xml(sign_xml, auth, invoice.xml)