[FIX] account_payment: Link Payment Transaction with Invoice for Electronic Payments
Steps to reproduce:
- Create an invoice through Accounting app
- Post the invoice
- Register the payment using the "Register Payment" wizard with an electronic payment method.
Description of the issue/feature this PR addresses: The payment transaction was not being linked to the invoice for electronic payments.
To resolve this, I passed the current invoice IDs as context through action_register_payment in the account.move.line model. Then, I retrieved this context value in _prepare_payment_transaction_vals of the account.payment model to set the invoice_ids Many2many field.
Current behavior before PR: The payment transaction is not linked to the invoice for electronic payments.
Desired behavior after PR is merged: The payment transaction will be correctly linked to the invoice for electronic payments.
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#230190 Forward-Port-Of: odoo/odoo#197091
@shyamgohil2000 @rugo-odoo this PR targets master and is the last of the forward-port chain.
To merge the full chain, use
@robodoo r+
More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port
@shyamgohil2000 @rugo-odoo ci/runbot failed on this forward-port PR
@shyamgohil2000 @rugo-odoo this forward port of odoo/odoo#197091 is awaiting action (not merged or closed).
@shyamgohil2000 @rugo-odoo this forward port of odoo/odoo#197091 is awaiting action (not merged or closed).
@shyamgohil2000 @rugo-odoo this forward port of odoo/odoo#197091 is awaiting action (not merged or closed).
@shyamgohil2000 @rugo-odoo this forward port of odoo/odoo#197091 is awaiting action (not merged or closed).
@shyamgohil2000 @rugo-odoo this forward port of odoo/odoo#197091 is awaiting action (not merged or closed).
