Skip to content

Commit

Permalink
Merge PR #4571 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by sergiocorato
  • Loading branch information
OCA-git-bot committed Jan 24, 2025
2 parents 0c63111 + 9923988 commit 4ba061f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,15 @@ def invoiceCreate(self, fatt, fatturapa_attachment, FatturaBody, partner_id):
# 2.5
self.set_attachments_data(FatturaBody, invoice)

if self.e_invoice_detail_level != "1":
# Avoid set roundings if import level is not maximum, because adding
# roundings generate problems:
# - generate a tax line in account.move.line
# entries with different values for amount_currency and balance
# raising ``check_amount_currency_balance_sign`` constraint in
# account.move
# - If rounding line is the only line the import generate a refund
# instead of an invoice
if self.e_invoice_detail_level == "2":
self.set_roundings(FatturaBody, invoice)

self.set_vendor_bill_data(FatturaBody, invoice)
Expand Down

0 comments on commit 4ba061f

Please sign in to comment.