Skip to content
Snippets Groups Projects
Commit f29471ca authored by Nshimiyimana Séna's avatar Nshimiyimana Séna
Browse files

[FIX] hr_expense: use correct exchange rates on expense


Bug
---
Let's say you make an expense in a foreign currency on date A. Then
you include this expense in an expense report. You set the report's
accounting date to B and post the journal entries. The system will
calculate the expense amounts based on the exchange rate on Date B.
But really, it should be using the exchange rate from Date A, the day
when the expense was made.

Steps to reproduce
------------------
* Enable multicurrency and make sure that you have different exchange
  rates configured for two different dates, which we'll refer to as
  Date A and Date B.
* Create an expense with a foreign currency and set the expense date to
  Date A.
* Save and click `Create Report`
* Submit to manager, and approve the report
* Navigate to the 'Other Info' tab and set the report's accounting date
  to Date B.
* Save and post the journal entries

Now, review the generated journal entries. You might notice that the
expense values have been calculated using the exchange rate from Date B,
rather than Date A.

opw-3119959

closes odoo/odoo#126922

X-original-commit: b6408e0d
Signed-off-by: default avatarLaurent Smet (las) <las@odoo.com>
Signed-off-by: default avatarSéna Serge Nshimiyimana (sesn) <sesn@odoo.com>
parent 138275d1
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment