From df4dcc8932e4488bd499e69fbf5a3fd769a9d927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Warnon?= Date: Mon, 29 Apr 2019 09:37:15 +0000 Subject: [PATCH] [FIX] payment: fix custom payment.transaction create method mechanism This commit will correctly check for a custom payment.transaction create method on 'self' instead of the acquirer's provider before calling it. closes odoo/odoo#33033 Signed-off-by: Thibault Delavallee (tde) --- addons/payment/models/payment_acquirer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/payment/models/payment_acquirer.py b/addons/payment/models/payment_acquirer.py index a56d0692819..f7ed1675487 100644 --- a/addons/payment/models/payment_acquirer.py +++ b/addons/payment/models/payment_acquirer.py @@ -490,7 +490,7 @@ class PaymentTransaction(models.Model): # custom create custom_method_name = '%s_create' % acquirer.provider - if hasattr(acquirer, custom_method_name): + if hasattr(self, custom_method_name): values.update(getattr(self, custom_method_name)(values)) # Default value of reference is