Merge branch '#23066' into '6.0'
Fix error query issued invoices. See merge request datalifeit/trytond-aeat_sii!6
This commit is contained in:
commit
090e87e98c
4
aeat.py
4
aeat.py
|
@ -632,7 +632,7 @@ class SIIReport(Workflow, ModelSQL, ModelView):
|
|||
else:
|
||||
sujeta = tipo_desglose.DesgloseTipoOperacion.Entrega.Sujeta
|
||||
|
||||
if sujeta.NoExenta:
|
||||
if sujeta and sujeta.NoExenta:
|
||||
for detail in sujeta.NoExenta.DesgloseIVA.DetalleIVA:
|
||||
taxes_to_create.append({
|
||||
'base': _decimal(detail.BaseImponible),
|
||||
|
@ -644,7 +644,7 @@ class SIIReport(Workflow, ModelSQL, ModelView):
|
|||
detail.CuotaRecargoEquivalencia),
|
||||
})
|
||||
taxes = SIIReportLineTax.create(taxes_to_create)
|
||||
elif sujeta.Exenta:
|
||||
elif sujeta and sujeta.Exenta:
|
||||
exemption = sujeta.Exenta.DetalleExenta[0].CausaExencion
|
||||
for exempt in EXEMPTION_CAUSE:
|
||||
if exempt[0] == exemption:
|
||||
|
|
Loading…
Reference in New Issue