mirror of
https://gitlab.com/datalifeit/trytond-aeat_sii
synced 2023-12-13 20:30:37 +01:00
Fix errors when query issued and received invoices.
This commit refs #21251
This commit is contained in:
parent
e04ee7ac22
commit
0815ecc62a
3
aeat.py
3
aeat.py
|
@ -671,6 +671,7 @@ class SIIReport(Workflow, ModelSQL, ModelView):
|
||||||
else:
|
else:
|
||||||
sujeta = tipo_desglose.DesgloseTipoOperacion.Entrega.Sujeta
|
sujeta = tipo_desglose.DesgloseTipoOperacion.Entrega.Sujeta
|
||||||
|
|
||||||
|
if sujeta:
|
||||||
if sujeta.NoExenta:
|
if sujeta.NoExenta:
|
||||||
for detail in sujeta.NoExenta.DesgloseIVA.DetalleIVA:
|
for detail in sujeta.NoExenta.DesgloseIVA.DetalleIVA:
|
||||||
taxes_to_create.append({
|
taxes_to_create.append({
|
||||||
|
@ -843,7 +844,7 @@ class SIIReport(Workflow, ModelSQL, ModelView):
|
||||||
_logger.debug(res)
|
_logger.debug(res)
|
||||||
registers = res.RegistroRespuestaConsultaLRFacturasRecibidas
|
registers = res.RegistroRespuestaConsultaLRFacturasRecibidas
|
||||||
pagination = res.IndicadorPaginacion
|
pagination = res.IndicadorPaginacion
|
||||||
last_invoice = registers[-1].IDFactura
|
last_invoice = registers and registers[-1].IDFactura or None
|
||||||
|
|
||||||
# FIXME: the reference is not forced to be unique
|
# FIXME: the reference is not forced to be unique
|
||||||
lines_to_create = []
|
lines_to_create = []
|
||||||
|
|
Loading…
Reference in a new issue