Skip to content

Commit

Permalink
FIX l10n_it_fatturapa_out_rc - AttributeError: 'DatiPagamentoType' ob…
Browse files Browse the repository at this point in the history
…ject has no attribute 'ImportoPagamento'

l10n_it_fatturapa_out_rc/wizard/wizard_export_e_invoice.py", line 197, in setDatiPagamento
    and DatiPagamento.ImportoPagamento:
AttributeError: 'DatiPagamentoType' object has no attribute 'ImportoPagamento'
  • Loading branch information
eLBati committed Mar 24, 2023
1 parent b580ea2 commit 5396890
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions l10n_it_fatturapa_out_rc/wizard/wizard_export_e_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,11 @@ def setDatiRiepilogo(self, invoice, body):
def setDatiPagamento(self, invoice, body):
super(WizardExportFatturapa, self).setDatiPagamento(invoice, body)
for DatiPagamento in body.DatiPagamento:
if invoice.type in ['out_refund', 'in_refund'] \
and invoice.fiscal_document_type_id.code not in ['TD04', 'TD08']\
and DatiPagamento.ImportoPagamento:
DatiPagamento.ImportoPagamento = - DatiPagamento.ImportoPagamento
for dettaglio in DatiPagamento.DettaglioPagamento:
if (
invoice.type in ['out_refund', 'in_refund']
and invoice.fiscal_document_type_id.code not in ['TD04', 'TD08']
and dettaglio.ImportoPagamento
):
dettaglio.ImportoPagamento = - dettaglio.ImportoPagamento
return True

0 comments on commit 5396890

Please sign in to comment.