Skip to content

Commit

Permalink
Risolve OCA#2093.
Browse files Browse the repository at this point in the history
Quando viene importata con dettaglio minimo la fattura non ha righe,
la max() fallisce su recordset vuoto.
  • Loading branch information
TheMule71 committed Feb 9, 2021
1 parent 32434ce commit 31626ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,8 @@ def set_roundings(self, FatturaBody, invoice):
_('Round up and down tax is not set')
)

line_sequence = max(invoice.invoice_line_ids.mapped('sequence'))
# invoice may have no lines at all if imported with minimum detail level
line_sequence = max(invoice.invoice_line_ids.mapped('sequence') or [0])
line_vals = []
for summary in FatturaBody.DatiBeniServizi.DatiRiepilogo:
to_round = float(summary.Arrotondamento or 0.0)
Expand Down

0 comments on commit 31626ad

Please sign in to comment.