From 293dbe267abe0a48f3f5f16e929d09bd0bc6198d Mon Sep 17 00:00:00 2001 From: Nikunj Ladava Date: Tue, 9 Oct 2018 05:27:50 +0000 Subject: [PATCH] [FIX] payment: fix invalid param on rpc fail This commit is related to Task ID 1891721 closes odoo/odoo#27555 --- addons/payment/static/src/js/payment_form.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/payment/static/src/js/payment_form.js b/addons/payment/static/src/js/payment_form.js index 77a14264dca..92858f89a66 100644 --- a/addons/payment/static/src/js/payment_form.js +++ b/addons/payment/static/src/js/payment_form.js @@ -125,7 +125,7 @@ odoo.define('payment.payment_form', function (require) { $(button).attr('disabled', false); $(button).children('.fa').addClass('fa-plus-circle') $(button).find('span.o_loader').remove(); - }).fail(function (data, event) { + }).fail(function (error, event) { // if the rpc fails, pretty obvious $(button).attr('disabled', false); $(button).children('.fa').addClass('fa-plus-circle') @@ -134,7 +134,7 @@ odoo.define('payment.payment_form', function (require) { self.displayError( _t('Server Error'), _t("We are not able to add your payment method at the moment.") + - message.data.message + error.data.message ); }); } @@ -176,11 +176,11 @@ odoo.define('payment.payment_form', function (require) { _t("We are not able to redirect you to the payment form.") ); } - }).fail(function (data, event) { + }).fail(function (error, event) { self.displayError( _t('Server Error'), _t("We are not able to redirect you to the payment form. ") + - message.data.message + error.data.message ); }); } @@ -292,7 +292,7 @@ odoo.define('payment.payment_form', function (require) { $(button).attr('disabled', false); $(button).children('.fa').addClass('fa-plus-circle') $(button).find('span.o_loader').remove(); - }).fail(function (data, event) { + }).fail(function (error, event) { // if the rpc fails, pretty obvious $(button).attr('disabled', false); $(button).children('.fa').addClass('fa-plus-circle') @@ -301,7 +301,7 @@ odoo.define('payment.payment_form', function (require) { self.displayError( _t('Server error'), _t("We are not able to add your payment method at the moment.

") + - data.data.message + error.data.message ); }); }