Skip to content
Snippets Groups Projects
Commit 414fb09b authored by Horacio Tellez's avatar Horacio Tellez Committed by Antoine Vandevenne (anv)
Browse files

[IMP] account_payment: Better reference for account payment memos

The Memo field in the form view of the `account.payment` model
(the `ref` field) was a little cryptic and did not supplied a lot
of information about the payment.
After this commit the Memo will (if available) provide information
about the sales order, the partner and the payment transaction.

Task - 3063368

Part-of: odoo/odoo#105550
parent b743e736
No related branches found
No related tags found
No related merge requests found
......@@ -147,7 +147,7 @@ class PaymentTransaction(models.Model):
'payment_method_line_id': payment_method_line.id,
'payment_token_id': self.token_id.id,
'payment_transaction_id': self.id,
'ref': self.reference,
'ref': f'{self.reference} - {self.partner_id.name} - {self.provider_reference or ""}',
**extra_create_values,
}
payment = self.env['account.payment'].create(payment_values)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment