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_account_stamp: add stamp by comparing price in company currency #3713

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

Borruso
Copy link
Contributor

@Borruso Borruso commented Nov 9, 2023

--
Confermo di aver firmato il CLA https://odoo-community.org/page/cla e di aver letto le linee guida su https://odoo-community.org/page/contributing

@Borruso Borruso changed the title [FIX] l10n_it_account_stamp: add stamp by comparing price in company currency [16.0][FIX] l10n_it_account_stamp: add stamp by comparing price in company currency Nov 9, 2023
@francesco-ooops
Copy link
Contributor

@Borruso l'obiettivo di questa PR è risolvere l'errore nel test InvoicingTest.test_amount_total_changing_currency ?

E' da fare anche per la 14?

@matteoopenf
Copy link
Contributor

@Borruso l'obiettivo di questa PR è risolvere l'errore nel test InvoicingTest.test_amount_total_changing_currency ?

E' da fare anche per la 14?

credo di si, l'altro giorno a una persona si rompeva a una persona su 14 leggevo su discord

@francesco-ooops
Copy link
Contributor

ok, in tal caso @Borruso apri una issue per favore

@Borruso Borruso force-pushed the 16.0-fix-l10n_it_account_stamp-company_currency branch 3 times, most recently from 781d53d to 1082b19 Compare November 14, 2023 15:33
@tafaRU
Copy link
Member

tafaRU commented Nov 17, 2023

@Borruso puoi aprire la issue di tracciamento in cui descrivi il problema che questa PR vuole correggere? Grazie.

@Borruso Borruso force-pushed the 16.0-fix-l10n_it_account_stamp-company_currency branch from 1082b19 to 43c6024 Compare November 17, 2023 10:42
@francesco-ooops francesco-ooops linked an issue Dec 18, 2023 that may be closed by this pull request
2 tasks
Copy link
Contributor

@SirAionTech SirAionTech left a comment

Choose a reason for hiding this comment

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

Grazie della PR!
Oltre alle modifiche suggerite qui sotto, è possibile aggiungere un test?

Comment on lines -24 to +34
inv_tax.price_subtotal
abs(inv_tax.balance)
Copy link
Contributor

Choose a reason for hiding this comment

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

Si suppone quindi che la valuta dell'azienda sia EUR, ma se non fosse così?
Credo sarebbe più corretto controllare prima che la valuta dell'azienda sia EUR, oppure controllare il valore convertito in EUR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

balance è nella valuta della company che non per forza deve essere EUR
stamp_apply_min_total_base questo campo in prodotto è un float che dovresti scrivere in base alla tua company, forse è proprio questo campo che ti può far supporre che l'azienda sia EUR

@@ -32,14 +32,13 @@ def is_tax_stamp_applicable(self):
return total_tax_base >= stamp_product_id.stamp_apply_min_total_base

@api.depends(
"invoice_line_ids.price_subtotal",
"line_ids.price_total",
"line_ids.balance",
"currency_id",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"currency_id",

Probabile che anche questo non serva più

Comment on lines 73 to 86
price_unit = inv.company_currency_id._convert(
stamp_product_id.list_price, inv.currency_id, inv.company_id, inv.date
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Credo che il campo list_price del prodotto sia nella valuta del prodotto quindi andrebbe convertito dalla valuta del prodotto alla valuta della fattura, analogamente a quanto fatto in https://github.com/odoo/odoo/blob/03d2e58f0d9e3beaf6ff8c4486675b4613b88283/addons/sale/models/product_template.py#L266-L269

@Borruso Borruso force-pushed the 16.0-fix-l10n_it_account_stamp-company_currency branch from 43c6024 to c68d778 Compare January 26, 2024 09:58
Copy link

github-actions bot commented Jun 9, 2024

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jun 9, 2024
@Borruso Borruso force-pushed the 16.0-fix-l10n_it_account_stamp-company_currency branch from c68d778 to b5fd4b1 Compare July 26, 2024 09:16
@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gestione bollo con fattura in valuta
5 participants