Skip to content

Commit

Permalink
[FIX] Ajusta os namespaces para envio de NFe no estado do PR
Browse files Browse the repository at this point in the history
 A biblioteca ZEEP remove namespaces duplicadas. O estado do PR exige a mesma namespace em duas tags, devemos adicionar a mesma na tag NFe antes do envio ao sefaz Paraná.
  • Loading branch information
felipeelopes authored and danimaribeiro committed Aug 20, 2018
1 parent 6310d71 commit b3086c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions pytrustnfe/nfe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ def _send(certificado, method, **kwargs):

port = next(iter(client.wsdl.port_types))
first_operation = next(iter(client.wsdl.port_types[port].operations))

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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding=utf-8
from setuptools import setup, find_packages

VERSION = "1.0.0"
VERSION = "1.0.1"


setup(
Expand Down

0 comments on commit b3086c5

Please sign in to comment.