Skip to content

Conversation

@glitchov
Copy link

Migration of #310 : for better extensibility, notify the invoice that a payment return has arrived and let it do what it implies for itself.

# payment_aml: credit on customer account (from payment move)
# invoice_amls: debit on customer account (from invoice move)
invoice_amls = payment_aml.matched_debit_ids.mapped("debit_move_id")
invoice_amls._payment_returned(return_line)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In version 12, the line 227 was removed (invoices.write(self._prepare_invoice_returned_vals()). If you don't do that, the invoices are written twice.

@glitchov glitchov force-pushed the 18.0-imp-account_payment_return-hda branch from a7dbc83 to c78ab23 Compare September 16, 2025 14:30
@qgroulard qgroulard force-pushed the 18.0-imp-account_payment_return-hda branch from c78ab23 to 294ff73 Compare November 27, 2025 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants