Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0] FIX l10n_it_fatturapa_out and l10n_it_fatturapa_out_rc avoiding to convert to EUR tax_base_amount as it is already in company currency (currency_field='company_currency_id') #3921

Merged
merged 2 commits into from
May 15, 2024

Conversation

eLBati
Copy link
Member

@eLBati eLBati commented Jan 31, 2024

@eLBati eLBati force-pushed the 16.0-fix-fpa_to_eur branch 2 times, most recently from afd0011 to 78be222 Compare January 31, 2024 16:10
@TheMule71
Copy link
Contributor

Vedo che stai spostando la conversione in EUR fuori dal template, e all_taxes viene passato coi valori già convertiti, il che è poco coerente col resto del template

@eLBati
Copy link
Member Author

eLBati commented Feb 1, 2024

Vedo che stai spostando la conversione in EUR fuori dal template, e all_taxes viene passato coi valori già convertiti, il che è poco coerente col resto del template

Più che spostando sto togliendo la conversione dal template, perchè tax_data['ImponibileImporto'] normalmente viene giustamente valorizzato con tax_base_amount , che è in valuta aziendale.
La conversione fatta nel wizard, per valorizzare ImponibileImporto usando line.price_subtotal, serve perchè stiamo usando (utilizzo che sembra essere necessario solo nei test) line.price_subtotal , che è nella valuta della fattura, per valorizzare un campo in valuta aziendale.

@francesco-ooops
Copy link
Contributor

@eLBati issue?

Copy link

@francescapenso francescapenso left a comment

Choose a reason for hiding this comment

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

functional review

Copy link
Contributor

@Borruso Borruso left a comment

Choose a reason for hiding this comment

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

LGTM

eLBati added 2 commits March 21, 2024 16:54
…e date

Steps:

 - Configure reverse charge
 - Configure 2 different rate for USD: for 19/12/2023 and for 31/01/2024
 - Create a USD supplier invoice with invoice date 19/12/2023 and accounting date 31/01/2024
 - Validate

Observed:

the currency rate of self invoice is 31/01/2024

Desired:

the currency rate of self invoice is 19/12/2023
…nvert to EUR tax_base_amount as it is already in company currency (currency_field='company_currency_id')

Note: tests are not using tax_base_amount to compute ImponibileImporto (they use line.price_subtotal) because it is empty, while it sould not

Steps:

 - Configure reverse charge for extra UE suppliers
 - Create an USD invoice, with 1 line,  with fiscal position for extra UE suppliers
 - Confirm
 - Generate XML from self invocie

Observed: "Totale imponibile" is different from "Prezzo unitario"

FIX l10n_it_fatturapa_out_rc in multi currency: use the supplier invoice date

REF fpa_to_eur using move line currency_rate when available
@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Copy link
Contributor

@odooNextev odooNextev left a comment

Choose a reason for hiding this comment

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

Approvo anche se non sono sicuro di aver testato tutto visto che l'avevo voluta provare per cercare di risolvere il problema dei pagamenti in un'altra valuta rispetto a quella della fattura.
Infatti abbiamo constatato che con questa casistica il file XML viene esportato correttamente, mentre prima no, ma resta il fatto che ci sono dei problemi nella compilazione del campo "importo in valuta" nella registrazione del pagamento dell'autofattura.
Appena riesco a spiegarmi meglio apro una issue, ma questa PR sembra fare quello che deve.

@odooNextev
Copy link
Contributor

@eLBati puoi mergiare?

@eLBati
Copy link
Member Author

eLBati commented May 15, 2024

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

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

@OCA-git-bot OCA-git-bot merged commit 4e256b8 into OCA:16.0 May 15, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

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

@odooNextev
Copy link
Contributor

/ocabot merge patch

Grazie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants