From d43ef076b119f9ec6902c5f7799467399e2f79da Mon Sep 17 00:00:00 2001 From: Danimar Ribeiro Date: Fri, 16 Sep 2016 17:19:27 -0300 Subject: [PATCH] Adicionando tags restantes ao xml de envio da NFe --- pytrustnfe/nfe/templates/NfeAutorizacao.xml | 315 +++++++++++++++++++++++++++- 1 file changed, 314 insertions(+), 1 deletion(-) diff --git a/pytrustnfe/nfe/templates/NfeAutorizacao.xml b/pytrustnfe/nfe/templates/NfeAutorizacao.xml index cead740..43e1f78 100644 --- a/pytrustnfe/nfe/templates/NfeAutorizacao.xml +++ b/pytrustnfe/nfe/templates/NfeAutorizacao.xml @@ -26,7 +26,46 @@ {{ ide.indFinal }} {{ ide.indPres }} {{ ide.procEmi }} - Odoo Brasil 9.0 + Odoo Brasil 10 + {% if ide.NFref is defined -%} + {% for ref in ide.NFref %} + + {% if ref.refNFe is defined -%} + {{ ref.refNFe }} + {% endif %} + {% if ref.refNF is defined -%} + + {{ ref.refNF.cUF }} + {{ ref.refNF.AAMM }} + {{ ref.refNF.CNPJ }} + {{ ref.refNF.mod }} + {{ ref.refNF.serie }} + {{ ref.refNF.nNF }} + + {% endif %} + {% if ref.refNFP is defined -%} + + {{ ref.refNFP.cUF }} + {{ ref.refNFP.AAMM }} + {{ ref.refNFP.CNPJ }} + {{ ref.refNFP.CPF }} + {{ ref.refNFP.IE }} + {{ ref.refNFP.mod }} + {{ ref.refNFP.serie }} + {{ ref.refNFP.nNF }} + {{ ref.refNFP.nNF }} + + {% endif %} + {% if ref.refECF is defined -%} + + {{ ref.refECF.mod }} + {{ ref.refECF.nECF }} + {{ ref.refECF.nCOO }} + + {% endif %} + + {% endfor %} + {% endif %} {% endwith %} @@ -52,6 +91,9 @@ {{ emit.enderEmit.fone }} {{ emit.IE }} + {{ emit.IEST }} + {{ emit.IM }} + {{ emit.CNAE }} {{ emit.CRT }} {% endwith %} @@ -78,8 +120,45 @@ {{ dest.indIEDest }} {% if dest.IE != '' -%}{{ dest.IE }}{% endif %} + {{ dest.ISUF }} + {{ dest.IM }} + {{ dest.email }} {% endwith %} + {% if NFe.infNFe.retirada is defined %} + + {{ NFe.infNFe.retirada.CNPJ }} + {{ NFe.infNFe.retirada.CPF }} + {{ NFe.infNFe.retirada.xLgr }} + {{ NFe.infNFe.retirada.nro }} + {{ NFe.infNFe.retirada.xCpl }} + {{ NFe.infNFe.retirada.xBairro }} + {{ NFe.infNFe.retirada.cMun }} + {{ NFe.infNFe.retirada.xMun }} + {{ NFe.infNFe.retirada.UF }} + + {% endif %} + {% if NFe.infNFe.entrega is defined %} + + {{ NFe.infNFe.entrega.CNPJ }} + {{ NFe.infNFe.entrega.CPF }} + {{ NFe.infNFe.entrega.xLgr }} + {{ NFe.infNFe.entrega.nro }} + {{ NFe.infNFe.entrega.xCpl }} + {{ NFe.infNFe.entrega.xBairro }} + {{ NFe.infNFe.entrega.cMun }} + {{ NFe.infNFe.entrega.xMun }} + {{ NFe.infNFe.entrega.UF }} + + {% endif %} + {% if NFe.infNFe.autXML %} + {% for autorizados in NFe.infNFe.autXML %} + + {{ autorizados.CNPJ }} + {{ autorizados.CPF }} + + {% endfor %} + {% endif %} {% for det in NFe.infNFe.detalhes %} @@ -88,6 +167,8 @@ {{ prod.cEAN }} {{ prod.xProd }} {{ prod.NCM }} + {{ prod.NVE }} + {{ prod.EXTIPI }} {{ prod.CFOP }} {{ prod.uCom }} {{ prod.qCom }} @@ -97,7 +178,58 @@ {{ prod.uTrib }} {{ prod.qTrib }} {{ prod.vUnTrib }} + {{ prod.vFrete }} + {{ prod.vSeg }} + {{ prod.vDesc }} + {{ prod.vOutro }} {{ prod.indTot }} + {% if prod.DI is defined %} + {% for di in prod.DI %} + + {{ di.nDI }} + {{ di.dDI }} + {{ di.xLocDesemb }} + {{ di.UFDesemb }} + {{ di.dDesemb }} + {{ di.tpViaTransp }} + {{ di.vAFRMM }} + {{ di.tpIntermedio }} + {{ di.CNPJ }} + {{ di.UFTerceiro }} + {{ di.cExportador }} + {% if di.adi is defined %} + {% for adi in di.adi %} + + {{ adi.nAdicao }} + {{ adi.nSeqAdic }} + {{ adi.cFabricante }} + {{ adi.vDescDI }} + {{ adi.nDraw }} + + {% endfor %} + {% endif %} + + {% endfor %} + {% endif %} + {% if prod.detExport is defined %} + {% for export in prod.detExport %} + + {{ export.nDraw }} + {% if export.exportInd is defined %} + {% for exp in export.exportInd %} + + {{ exp.nRE }} + {{ exp.chNFe }} + {{ exp.qExport }} + + {% endfor %} + {% endif %} + + {% endfor %} + {% endif %} + {{ prod.xPed }} + {{ prod.nItemPed }} + {{ prod.nFCI }} {% endwith %} @@ -114,6 +246,145 @@ {{ imposto.ICMS.vICMS }} {% endif %} + {% if imposto.ICMS.CST == '10' -%} + + {{ imposto.ICMS.orig }} + {{ imposto.ICMS.CST }} + {{ imposto.ICMS.modBC }} + {{ imposto.ICMS.vBC }} + {{ imposto.ICMS.pICMS }} + {{ imposto.ICMS.vICMS }} + {{ imposto.ICMS.modBCST }} + {{ imposto.ICMS.pMVAST }} + {{ imposto.ICMS.pRedBCST }} + {{ imposto.ICMS.vBCST }} + {{ imposto.ICMS.pICMSST }} + {{ imposto.ICMS.vICMSST }} + + {% endif %} + {% if imposto.ICMS.CST == '20' -%} + + {{ imposto.ICMS.orig }} + {{ imposto.ICMS.CST }} + {{ imposto.ICMS.modBC }} + {{ imposto.ICMS.pRedBC }} + {{ imposto.ICMS.vBC }} + {{ imposto.ICMS.pICMS }} + {{ imposto.ICMS.vICMS }} + {{ imposto.ICMS.vICMSDeson }} + {{ imposto.ICMS.motDesICMS }} + + {% endif %} + {% if imposto.ICMS.CST == '30' -%} + + {{ imposto.ICMS.orig }} + {{ imposto.ICMS.CST }} + {{ imposto.ICMS.modBCST }} + {{ imposto.ICMS.pMVAST }} + {{ imposto.ICMS.pRedBCST }} + {{ imposto.ICMS.vBCST }} + {{ imposto.ICMS.pICMSST }} + {{ imposto.ICMS.vICMSST }} + {{ imposto.ICMS.vICMSDeson }} + {{ imposto.ICMS.motDesICMS }} + + {% endif %} + {% if imposto.ICMS.CST in ('40', '41', '50') -%} + + {{ imposto.ICMS.orig }} + {{ imposto.ICMS.CST }} + {{ imposto.ICMS.vICMSDeson }} + {{ imposto.ICMS.motDesICMS }} + + {% endif %} + {% if imposto.ICMS.CST == '51' -%} + + {{ imposto.ICMS.orig }} + {{ imposto.ICMS.CST }} + {{ imposto.ICMS.modBC }} + {{ imposto.ICMS.pRedBC }} + {{ imposto.ICMS.vBC }} + {{ imposto.ICMS.pICMS }} + {{ imposto.ICMS.vICMSOp }} + {{ imposto.ICMS.pDif }} + {{ imposto.ICMS.vICMSDif }} + {{ imposto.ICMS.vICMS }} + + {% endif %} + {% if imposto.ICMS.CST == '60' -%} + + {{ imposto.ICMS.orig }} + {{ imposto.ICMS.CST }} + {{ imposto.ICMS.vBCSTRet }} + {{ imposto.ICMS.vICMSSTRet }} + + {% endif %} + {% if imposto.ICMS.CST == '70' -%} + + {{ imposto.ICMS.orig }} + {{ imposto.ICMS.CST }} + {{ imposto.ICMS.modBC }} + {{ imposto.ICMS.pRedBC }} + {{ imposto.ICMS.vBC }} + {{ imposto.ICMS.pICMS }} + {{ imposto.ICMS.vICMS }} + {{ imposto.ICMS.modBCST }} + {{ imposto.ICMS.pMVAST }} + {{ imposto.ICMS.pRedBCST }} + {{ imposto.ICMS.pICMSST }} + {{ imposto.ICMS.vICMSST }} + {{ imposto.ICMS.vICMSDeson }} + {{ imposto.ICMS.motDesICMS }} + + {% endif %} + {% if imposto.ICMS.CST == '90' -%} + + {{ imposto.ICMS.orig }} + {{ imposto.ICMS.CST }} + {{ imposto.ICMS.modBC }} + {{ imposto.ICMS.vBC }} + {{ imposto.ICMS.pRedBC }} + {{ imposto.ICMS.pICMS }} + {{ imposto.ICMS.vICMS }} + {{ imposto.ICMS.modBCST }} + {{ imposto.ICMS.pMVAST }} + {{ imposto.ICMS.pRedBCST }} + {{ imposto.ICMS.vBCST }} + {{ imposto.ICMS.pICMSST }} + {{ imposto.ICMS.vICMSST }} + {{ imposto.ICMS.vICMSDeson }} + {{ imposto.ICMS.motDesICMS }} + + {% endif %} + {% if imposto.ICMSPart is defined -%} + + {{ imposto.ICMSPart.orig }} + {{ imposto.ICMSPart.CST }} + {{ imposto.ICMSPart.modBC }} + {{ imposto.ICMSPart.vBC }} + {{ imposto.ICMSPart.pRedBC }} + {{ imposto.ICMSPart.pICMS }} + {{ imposto.ICMSPart.vICMS }} + {{ imposto.ICMSPart.modBCST }} + {{ imposto.ICMSPart.pMVAST }} + {{ imposto.ICMSPart.pRedBCST }} + {{ imposto.ICMSPart.vBCST }} + {{ imposto.ICMSPart.pICMSST }} + {{ imposto.ICMSPart.vICMSST }} + {{ imposto.ICMSPart.pBCOp }} + {{ imposto.ICMSPart.UFST }} + + {% endif %} + {% if imposto.ICMSST is defined -%} + + {{ imposto.ICMSST.orig }} + {{ imposto.ICMSST.CST }} + {{ imposto.ICMSST.vBCSTRet }} + {{ imposto.ICMSST.vICMSSTRet }} + {{ imposto.ICMSST.vBCSTDest }} + {{ imposto.ICMSST.vICMSSTDest }} + + {% endif %} {% if imposto.ICMS.CST == '101' -%} {{ imposto.ICMS.orig }} @@ -379,6 +650,19 @@ {% endwith %} {% endif %} + {% if NFe.infNFe.retTrib is defined %} + + {% with retencao = NFe.infNFe.retTrib %} + {{ retencao.vRetPIS }} + {{ retencao.vRetCOFINS }} + {{ retencao.vRetCSLL }} + {{ retencao.vBCIRRF }} + {{ retencao.vIRRF }} + {{ retencao.vBCRetPrev }} + {{ retencao.vRetPrev }} + {% endwith %} + + {% endif %} {{ NFe.infNFe.transp.modFrete }} @@ -441,6 +725,21 @@ {% endif %} {% endif %} + {% if NFe.infNFe.pag is defined %} + {% for pag in NFe.infNFe.pag %} + + {{ pag.tPag }} + {{ pag.vPag }} + {% if pag.card is defined %} + + {{ pag.card.CNPJ }} + {{ pag.card.tBand }} + {{ pag.card.cAut }} + + {% endif %} + + {% endfor %} + {% endif %} {{ NFe.infNFe.infAdic.infAdFisco }} {{ NFe.infNFe.infAdic.infCpl }} @@ -461,6 +760,20 @@ {% endfor %} {% endif %} + {% if NFe.infNFe.exporta is defined %} + + {{ NFe.infNFe.exporta.UFSaidaPais }} + {{ NFe.infNFe.exporta.xLocExporta }} + {{ NFe.infNFe.exporta.xLocDespacho }} + + {% endif %} + {% if NFe.infNFe.compra is defined %} + + {{ obs.xNEmp }} + {{ obs.xPed }} + {{ obs.xCont }} + + {% endif %} {% endfor %}