Repository navigation
[19.0][OU-FIX] account: link exchange move to an existing partial - #6114
Open
JordiBForgeFlow wants to merge 2 commits into
Open
JordiBForgeFlow wants to merge 2 commits into
JordiBForgeFlow wants to merge 2 commits into
Conversation
The test only checked that the exchange move was linked to a partial reconciliation of the full reconciliation, which a copy of a partial also satisfies. Check that the lines of the full reconciliation are still reconciled and keep no residual, in company or foreign currency.
The migration of account.full.reconcile#exchange_move_id copied the last partial reconciliation of each full reconciliation to hold the exchange move. The copy keeps the amount, so every line of those reconciliations gets the amount counted twice: lines are no longer reconciled, residuals appear and invoices go from paid to partial. Link the exchange move to an existing partial reconciliation instead.
|
I can review this in exchange for a review of #6113 (18.0 product defaults migration). Would that work? |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The migration of account.full.reconcile#exchange_move_id copied the last partial
reconciliation of each full reconciliation to hold the exchange move. The copy keeps the
amount, so every line of those reconciliations gets the amount counted twice: lines are
no longer reconciled, residuals appear and invoices go from paid to partial.
This links the exchange move to an existing partial reconciliation of the full
reconciliation instead, without creating any new partial.
Steps to reproduce:
a foreign currency paid at a different rate).
residual equal to the amount of the copied partial.
Expected: the invoice stays paid and the partials, residuals and payment states match
18.0. Checked on a production database with about 18,000 full reconciliations: after
the fix, account moves, lines, partials and open items by partner match 18.0.
The first commit extends the migration test to check that the lines of the full
reconciliation stay reconciled with no residual: it fails without the fix
(
reconciledis False) and passes with it.Assisted by AI