From 4035a0519641d6d1a3003870b37fbd15d12ced7c Mon Sep 17 00:00:00 2001 From: Junior Tada Date: Sat, 23 Jan 2016 11:00:56 -0200 Subject: [PATCH] =?UTF-8?q?Teste=20Ok=20para=20m=C3=A9todo=20NfeDownloadNf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pynfe/processamento/comunicacao.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pynfe/processamento/comunicacao.py b/pynfe/processamento/comunicacao.py index f7d079c..baaa0fa 100644 --- a/pynfe/processamento/comunicacao.py +++ b/pynfe/processamento/comunicacao.py @@ -198,11 +198,15 @@ class ComunicacaoSefaz(Comunicacao): return self._post(url, xml) def download(self, cnpj, chave): + """ + Metodo para download de NFe por parte de destinatário. + O certificado digital deve ser o mesmo do destinatário da Nfe. + NT 2012/002 + """ # url do serviço url = self._get_url_AN(consulta='DOWNLOAD') # Monta XML do corpo da requisição raiz = etree.Element('downloadNFe', versao='1.00', xmlns=NAMESPACE_NFE) - etree.SubElement(raiz, 'versao').text = '1.00' etree.SubElement(raiz, 'tpAmb').text = str(self._ambiente) etree.SubElement(raiz, 'xServ').text = 'DOWNLOAD NFE' etree.SubElement(raiz, 'CNPJ').text = str(cnpj) @@ -210,8 +214,7 @@ class ComunicacaoSefaz(Comunicacao): # Monta XML para envio da requisição xml = self._construir_xml_status_pr(cabecalho=self._cabecalho_soap(metodo='NfeDownloadNF'), metodo='NfeDownloadNF', dados=raiz) - print (url) - #return xml + return self._post(url, xml) def inutilizar_faixa_numeracao(self, numero_inicial, numero_final, emitente, certificado, senha, ano=None, serie='1', justificativa=''):