From 8be798375eadefb6b66e3065a1af3f5eef9ab78a Mon Sep 17 00:00:00 2001 From: Nikunj Ladava Date: Mon, 30 Jul 2018 12:03:02 +0530 Subject: [PATCH] [FIX] payment: fix rpc.fail in payment form Parameters of the rpc.fail is changed because of this commit : https://github.com/odoo/odoo/commit/fc5d030ef2695f7d2daeb87db9697240be4b99d4#diff-c52e0c611c3001980c7a7be0f6395e60R80 This commit is related to Task ID: 1869500 Closes #26052 --- addons/payment/static/src/js/payment_form.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/payment/static/src/js/payment_form.js b/addons/payment/static/src/js/payment_form.js index f28a4747a8e..10ddb19ee37 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 (message, data) { + }).fail(function (data, event) { // if the rpc fails, pretty obvious $(button).attr('disabled', false); $(button).children('.fa').addClass('fa-plus-circle') @@ -176,7 +176,7 @@ odoo.define('payment.payment_form', function (require) { _t("We are not able to redirect you to the payment form.") ); } - }).fail(function (message, data) { + }).fail(function (data, event) { self.displayError( _t('Server Error'), _t("We are not able to redirect you to the payment form. ") + @@ -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 (message, data) { + }).fail(function (data, event) { // if the rpc fails, pretty obvious $(button).attr('disabled', false); $(button).children('.fa').addClass('fa-plus-circle') @@ -364,7 +364,7 @@ odoo.define('payment.payment_form', function (require) { // if there's no records linked to this payment method, then we delete it tokenDelete(); } - }, function (type, err) { + }, function (err, event) { self.displayError( _t('Server Error'), _t("We are not able to delete your payment method at the moment.") + err.data.message