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'],