Files
odoo_source/addons/hr_expense/tests
Adrien Widart 4a54a0dcb5 [FIX] hr_expense: convert base amount if different currency
In a multi-currencies environment, if the user creates an expense with a
different currency than the company's, one of the associated account
move lines will have an incorrect base amount.

To reproduce the issue:
(Need account_accountant. Let USD be the company's currency)
1. In Settings, enable "Multi-Currencies"
2. Edit the currency rates:
    - EUR: 2
    - USD: 1
3. Create an expense:
    - Currency: EUR
    - Unit Price: 700
    - tax: 15%
4. Create Report, Submit, Approve, Post Journal Entries
5. Accounting > Reporting > Tax Report, This Financial Year
6. Audit of "Tax 15.00%"

Error: Base amount of the expense is $700, which is incorrect. It should
be either 700€ or $350

OPW-2613547

closes odoo/odoo#75264

X-original-commit: d6fd7301291dfe3ffd58d33edb3f2c4270e3b8a1
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-08-18 15:14:08 +00:00
..
…