Browse Source

Update __init__.py

removido verificação do estado
pull/168/head
Felipe Lopes 7 years ago
committed by GitHub
parent
commit
f9d4c80589
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      pytrustnfe/nfe/__init__.py

7
pytrustnfe/nfe/__init__.py

@ -135,10 +135,9 @@ def _send(certificado, method, **kwargs):
port = next(iter(client.wsdl.port_types))
first_operation = next(iter(client.wsdl.port_types[port].operations))
if kwargs['estado'] == '41':
namespaceNFe = xml.find(".//{http://www.portalfiscal.inf.br/nfe}NFe")
if namespaceNFe is not None:
namespaceNFe.set('xmlns', 'http://www.portalfiscal.inf.br/nfe')
namespaceNFe = xml.find(".//{http://www.portalfiscal.inf.br/nfe}NFe")
if namespaceNFe is not None:
namespaceNFe.set('xmlns', 'http://www.portalfiscal.inf.br/nfe')
with client.settings(raw_response=True):
response = client.service[first_operation](xml)

Loading…
Cancel
Save