Fix - al importar de Factura Libre

This commit is contained in:
Mauricio Baeza 2017-12-28 18:26:38 -06:00
parent 1c8fff1d37
commit d3afe55eef
1 changed files with 6 additions and 2 deletions

View File

@ -2347,10 +2347,14 @@ class ImportFacturaLibre(object):
)
data = []
for row in rows:
row = dict(row)
if not 'xml_acuse'in row:
row['xml_acuse'] = ''
new = {t: row[s] for s, t in fields}
if not new['uuid']:
if not 'uuid' in new or not new['uuid']:
new['uuid'] = None
if new['xml'] is None:
if not 'xml' in new or new['xml'] is None:
new['xml'] = ''
if row['estatus'] == 'Pagada':
new['pagada'] = True