odoo icon indicating copy to clipboard operation
odoo copied to clipboard

[FIX] account_payment: Link Payment Transaction with Invoice for Electronic Payments

Open fw-bot opened this issue 2 months ago • 8 comments

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

fw-bot avatar Oct 17 '25 08:10 fw-bot

Pull request status dashboard

robodoo avatar Oct 17 '25 08:10 robodoo

@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

fw-bot avatar Oct 17 '25 08:10 fw-bot

@shyamgohil2000 @rugo-odoo ci/runbot failed on this forward-port PR

fw-bot avatar Oct 17 '25 08:10 fw-bot

@shyamgohil2000 @rugo-odoo this forward port of odoo/odoo#197091 is awaiting action (not merged or closed).

fw-bot avatar Oct 25 '25 02:10 fw-bot

@shyamgohil2000 @rugo-odoo this forward port of odoo/odoo#197091 is awaiting action (not merged or closed).

fw-bot avatar Nov 01 '25 02:11 fw-bot

@shyamgohil2000 @rugo-odoo this forward port of odoo/odoo#197091 is awaiting action (not merged or closed).

fw-bot avatar Nov 08 '25 02:11 fw-bot

@shyamgohil2000 @rugo-odoo this forward port of odoo/odoo#197091 is awaiting action (not merged or closed).

fw-bot avatar Nov 15 '25 02:11 fw-bot

@shyamgohil2000 @rugo-odoo this forward port of odoo/odoo#197091 is awaiting action (not merged or closed).

fw-bot avatar Dec 13 '25 02:12 fw-bot