-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
[FIX] send total amount as euro in invoice #94
Conversation
Hi @dreispt, |
Hi, the balance is total amount, not per unit amount, right? Also, I worry about the case where price can be tax inclusive (b2c). |
@dreispt thanks for your help, you are correct. If the line's currency is different than company's currency, we are now converting the unit price to company's currency. |
Co-authored-by: Daniel Reis <dreis@opensourceintegrators.com>
line.price_unit, | ||
line.company_id.currency_id, | ||
line.company_id, | ||
date_today, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why today, shouldn't it be the Invoice Date?
What date is used to convert the amount used for the accounting entries?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dreispt invoice date seems more reasonable. I checked the way Odoo is calculating the currency rate for the invoice line and did the same, new commit is available to improve this.
Found out that when sending the invoice amount using another currency than Euro, the conversion would be wrong. This is due to invoicexpress expecting to receive the amount in Euro and proceeding to exchange to whatever currency we sent. Using the balance field, Odoo will automatically exchange the amount to the currency that is set in the users Company, which needs to be set to Euro.