From 482480fa08c2d2ba71837fa8a7b80835817fc72d Mon Sep 17 00:00:00 2001 From: martini97 Date: Mon, 10 Oct 2016 19:55:29 -0300 Subject: [PATCH] =?UTF-8?q?Corre=C3=A7=C3=B5es=20na=20emiss=C3=A3o=20de=20?= =?UTF-8?q?nota=20fiscal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pytrustnfe/nfe/assinatura.py | 4 ++++ pytrustnfe/nfe/templates/NfeAutorizacao.xml | 5 ++++- setup.py | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pytrustnfe/nfe/assinatura.py b/pytrustnfe/nfe/assinatura.py index b7558fc..9520ace 100644 --- a/pytrustnfe/nfe/assinatura.py +++ b/pytrustnfe/nfe/assinatura.py @@ -26,6 +26,10 @@ class Assinatura(object): digest_algorithm='sha1', c14n_algorithm='http://www.w3.org/TR/2001/REC-xml-c14n-20010315') + ns = {} + ns[None] = signer.namespaces['ds'] + signer.namespaces = ns + signed_root = signer.sign( xml_element, key=key, cert=cert, reference_uri=('#%s' % reference)) diff --git a/pytrustnfe/nfe/templates/NfeAutorizacao.xml b/pytrustnfe/nfe/templates/NfeAutorizacao.xml index bc35bdf..aaeefb5 100644 --- a/pytrustnfe/nfe/templates/NfeAutorizacao.xml +++ b/pytrustnfe/nfe/templates/NfeAutorizacao.xml @@ -159,8 +159,9 @@ {% endfor %} {% endif %} + {% set count = 1 %} {% for det in NFe.infNFe.detalhes %} - + {% with prod = det.prod %} {{ prod.cProd }} @@ -168,6 +169,7 @@ {{ prod.xProd }} {{ prod.NCM }} {{ prod.NVE }} + {{ prod.CEST }} {{ prod.EXTIPI }} {{ prod.CFOP }} {{ prod.uCom }} @@ -611,6 +613,7 @@ {% if det.infAdProd %} {{ det.infAdProd }} {% endif %} + {% set count = count + 1 %} {% endfor %} diff --git a/setup.py b/setup.py index 8bac309..de95685 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ long_description = pypandoc.convert('README.md', 'rst') setup( name="PyTrustNFe", - version="0.1.3", + version="0.1.4", author="Danimar Ribeiro", author_email='danimaribeiro@gmail.com', keywords=['nfe', 'mdf-e'],