From 59457090e9d587de79975337a6f2f9ea544e1142 Mon Sep 17 00:00:00 2001 From: Danimar Ribeiro Date: Mon, 20 Aug 2018 11:03:10 -0300 Subject: [PATCH] =?UTF-8?q?[FIX]=20Ajusta=20os=20namespaces=20para=20envio?= =?UTF-8?q?=20de=20NFe=20no=20estado=20do=20PR=20A=20biblioteca=20ZEEP=20r?= =?UTF-8?q?emove=20namespaces=20duplicadas.=20O=20estado=20do=20PR=20exige?= =?UTF-8?q?=20a=20mesma=20namespace=20em=20duas=20tags,=20devemos=20adicio?= =?UTF-8?q?nar=20a=20mesma=20na=20tag=20NFe=20antes=20do=20envio=20ao=20se?= =?UTF-8?q?faz=20Paran=C3=A1.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pytrustnfe/nfe/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pytrustnfe/nfe/__init__.py b/pytrustnfe/nfe/__init__.py index 0f80937..72786b7 100644 --- a/pytrustnfe/nfe/__init__.py +++ b/pytrustnfe/nfe/__init__.py @@ -135,6 +135,11 @@ def _send(certificado, method, **kwargs): port = next(iter(client.wsdl.port_types)) first_operation = [x for x in iter( client.wsdl.port_types[port].operations) if "Zip" not in x][0] + + 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)