[FIX] account: move date on reversed exchange move
Before this commit, the reversal of a passed exchange
move was not created on the correct date:
- If sequence is reset by month, the reversal should
be created at the end of the month of the exchange
move, and if sequence is reset by year, at the end
of the year.
Steps:
- With a foreign currency X activated and two different
rates few months in the past.
- Create and confirm an invoice with currency X at the
date of the first rate.
- Register a payment at the date of the second rate
(an exchange move is created).
- Unreconcile the payment from the invoice.
-> A reversal of the exchange move is created, but the
date is wrong (set to today's date).
opw-2856385
closes odoo/odoo#121279
Signed-off-by:
Brice Bartoletti (bib) <bib@odoo.com>
Showing
- addons/account/models/account_full_reconcile.py 1 addition, 2 deletionsaddons/account/models/account_full_reconcile.py
- addons/account/models/account_move.py 1 addition, 1 deletionaddons/account/models/account_move.py
- addons/account/models/account_partial_reconcile.py 1 addition, 2 deletionsaddons/account/models/account_partial_reconcile.py
- addons/account/tests/common.py 4 additions, 1 deletionaddons/account/tests/common.py
- addons/account/tests/test_account_move_out_invoice.py 56 additions, 0 deletionsaddons/account/tests/test_account_move_out_invoice.py
Loading