Browse Source

Fix the build for now - NFCe needs to create the urls

pull/9/head
Danimar Ribeiro 9 years ago
parent
commit
223aac5994
  1. 11
      pytrustnfe/Servidores.py
  2. 2
      pytrustnfe/nfe/__init__.py

11
pytrustnfe/Servidores.py

@ -68,10 +68,15 @@ SIGLA_ESTADO = {
}
def localizar_url(servico, estado, mod=55, ambiente=2):
def localizar_url(servico, estado, mod='55', ambiente=2):
sigla = SIGLA_ESTADO[estado]
dominio = ESTADO_WS[sigla][mod][ambiente]['servidor']
complemento = ESTADO_WS[sigla][mod][ambiente][servico]
ws = ESTADO_WS[sigla]
if mod in ws:
dominio = ws[mod][ambiente]['servidor']
complemento = ws[mod][ambiente][servico]
else:
dominio = ws[ambiente]['servidor']
complemento = ws[ambiente][servico]
if sigla == 'RS' and servico == WS_NFE_CADASTRO:
dominio = 'cad.sefazrs.rs.gov.br'

2
pytrustnfe/nfe/__init__.py

@ -85,7 +85,7 @@ def _add_qrCode(xml, **kwargs):
def _send(certificado, method, sign, **kwargs):
path = os.path.join(os.path.dirname(__file__), 'templates')
modelo = kwargs['NFes'][0]['infNFe']['ide']['mod']
modelo = '55'
xmlElem_send = render_xml(path, '%s.xml' % method, True, **kwargs)
if sign:
# Caso for autorização temos que adicionar algumas tags tipo

Loading…
Cancel
Save