[FW][FIX] account_payment: ensure consistent invoice and payment journal entry account_id #210756
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.

"demo") with an outstanding receipt account in the bank journal used by the website (automatic invoicing enabled). Enable Automatic Invoice for online payment."demo"payment method with the new partner.The generated invoice and its corresponding journal entry do not share the same
account_id(Account Receivable).The invoice uses the
account_idcomputed in_compute_account_idofaccount.move.line, which is not necessarily the same as theaccount_idset on the partner.After this commit, the payment uses the same
account_idas the related invoice, (same as _create_payment_vals_from_wizard) avoiding any discrepancy.opw-4669927
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: #209318
Forward-Port-Of: #204489