Skip to content

Commit

Permalink
Merge b3457cb into 6310d71
Browse files Browse the repository at this point in the history
  • Loading branch information
felipeelopes committed Aug 17, 2018
2 parents 6310d71 + b3457cb commit 32a54a8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pytrustnfe/nfe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ 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')

with client.settings(raw_response=True):
response = client.service[first_operation](xml)
response, obj = sanitize_response(response.text)
Expand Down

0 comments on commit 32a54a8

Please sign in to comment.