Skip to content

[16.0][FIX] l10n_it_fatturapa_in_rc: round tax amount#4951

Merged
OCA-git-bot merged 1 commit into
OCA:16.0from
mktsrl:16.0-fix-l10n_it_fattura_in_rc-round_in_e_inv_checks
Jun 12, 2026
Merged

[16.0][FIX] l10n_it_fatturapa_in_rc: round tax amount#4951
OCA-git-bot merged 1 commit into
OCA:16.0from
mktsrl:16.0-fix-l10n_it_fattura_in_rc-round_in_e_inv_checks

Conversation

@TennyMkt

Copy link
Copy Markdown
Contributor

Quando viene importata una fattura fornitore con reverse charge, potrebbe segnalare incongruenze con gli importi della fattura elettronica per un mancato arrotondamento.

Applicando la self.currency_id.round() alla get_tax_amount_added_for_rc() il problema viene risolto

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @sergiocorato,
some modules you are maintaining are being modified, check this out!

@francesco-ooops francesco-ooops added 16.0 missing issue PRs must be linked to an issue. See the wiki. labels Oct 17, 2025
@SirPyTech

Copy link
Copy Markdown

@TennyMkt puoi verificare se questa PR risolve la issue #3736?
Oppure fornire un esempio numerico (in una issue, vedi https://github.com/OCA/l10n-italy/wiki/Team-di-sviluppo#apertura-issue) per il caso d'uso che questa PR sta correggendo?
Grazie!

@TennyMkt

Copy link
Copy Markdown
Contributor Author

@TennyMkt puoi verificare se questa PR risolve la issue #3736? Oppure fornire un esempio numerico (in una issue, vedi https://github.com/OCA/l10n-italy/wiki/Team-di-sviluppo#apertura-issue) per il caso d'uso che questa PR sta correggendo? Grazie!

La issue #3736 parla di 3 decimali mentre, almeno nella 16.0, il messaggio che segnala una differenza negli importi scrive molti più decimali. A parte il numero di decimali, questa PR risolve il problema dell'arrotondamento descritto.

Ho preparato questo XML con un importo (12746.25 €) che se importato in Odoo senza il fix di questa PR, segnala una differenza di importi:
IT01234567890_FPR06.xml

@danall59 danall59 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

La modifica funziona, è operativa presso diversi nostri clienti.

@TheMule71

Copy link
Copy Markdown
Contributor

Unico dubbio, se spostare la round() nella get_tax_amount_added_for_rc() direttamente.
Viene usata in l10n_it_reverse_charge per le righe contabili, da capire se impatta arrotondare.

@TennyMkt

Copy link
Copy Markdown
Contributor Author

Unico dubbio, se spostare la round() nella get_tax_amount_added_for_rc() direttamente. Viene usata in l10n_it_reverse_charge per le righe contabili, da capire se impatta arrotondare.

Ho provato a mettere la round() direttamente nella get_tax_amount_added_for_rc() ma ci sono casistiche in cui risulta errata la generazione del "Movimento pagamento RC" (RRC).

Esempio pratico (seppur improbabile):
Data questa fattura Acquisto Reverse Charge (ARC), con un cambio EUR/USD a 1,1634:

image (che risulta avere con IVA 1.00€)

Quando viene confermata, SENZA il round() in get_tax_amount_added_for_rc() si ottiene un "Movimento pagamento RC" (RRC):
image
(con 1,00€ di IVA)

CON il round() in get_tax_amount_added_for_rc() si ottiene un "Movimento pagamento RC" (RRC):
image
(con 1.01€ di IVA)

@TheMule71 TheMule71 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TheMule71

Copy link
Copy Markdown
Contributor

/ocabot merge patch

@OCA-git-bot

Copy link
Copy Markdown
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-4951-by-TheMule71-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 1e69593 into OCA:16.0 Jun 12, 2026
6 of 7 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 0644de9. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

16.0 approved merged 🎉 missing issue PRs must be linked to an issue. See the wiki.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants