Fix - al importar de Factura Libre

This commit is contained in:
Mauricio Baeza 2017-12-20 18:02:05 -06:00
parent eed9b1d29c
commit 3949a89824
1 changed files with 4 additions and 1 deletions

View File

@ -397,7 +397,6 @@ class Certificado(object):
print ('\n', result)
return data
if not DEBUG:
if not rfc == session_rfc:
self.error = 'El RFC del certificado no corresponde.'
@ -1755,6 +1754,7 @@ class ImportFacturaLibre(object):
tasas = {
'16': 0.16,
'16.00': 0.16,
'11': 0.11,
'-10': 0.10,
'0': 0.0,
@ -1861,6 +1861,9 @@ class ImportFacturaLibre(object):
for row in rows:
new = {t: row[s] for s, t in fields}
new['slug'] = to_slug(new['nombre'])
new['fecha_alta'] = str(parser.parse(new['fecha_alta']))
for _, f in fields:
new[f] = new[f] or ''
if new['es_extranjero']:
new['tipo_persona'] = 4
elif new['rfc'] == 'XAXX010101000':