-
- Downloads
[FIX] account: multi-currencies fixes
Along with new tests, 2 things have been changed: 1) amount_currency field is not written anymore when matching an amount paid in company currency against some invoice(s) in secondary currency (see changes in test_reconciliation.py) This was previously made to help computing the exchange rate difference entry, but we now instead completelly rely on the amount_currency field set on the partial reconciliation. Besides being wrong from a purely functional pont of view (we never received money in secondary currency so why should the ORM act as if it was the case), it was the root cause of the problem related test_partial_reconcile_currencies_02, in test_reconciliation.py. 2) when registering a payment directly from an invoice, containing both an exchange difference and a write-off to force the full reconciliation, we now correctly create the accounting entries. A weird behavior spotted in #21888 was introduced by 20935462, to deal with impossibility to full reconcile an invoice due to rounding errors. Fortunately, this use case (test_payment_and_writeoff_in_other_currency_3, in test_payment.py) can now be solved in the right way thanks to changes introduced in the previous point.
Showing
- addons/account/models/account_bank_statement.py 0 additions, 18 deletionsaddons/account/models/account_bank_statement.py
- addons/account/models/account_move.py 29 additions, 15 deletionsaddons/account/models/account_move.py
- addons/account/models/account_payment.py 6 additions, 28 deletionsaddons/account/models/account_payment.py
- addons/account/tests/test_payment.py 96 additions, 3 deletionsaddons/account/tests/test_payment.py
- addons/account/tests/test_reconciliation.py 8 additions, 8 deletionsaddons/account/tests/test_reconciliation.py
Loading
Please register or sign in to comment