[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) <tde@openerp.com>
This commit is contained in:
Aurélien Warnon
2019-04-30 07:45:19 +00:00
parent 4039fc5201
commit df4dcc8932
+1 -1
View File
@@ -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