summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikunj Ladava <nla@odoo.com>2018-10-09 05:27:50 +0000
committerNikunj Ladava <nla@odoo.com>2018-10-09 05:42:29 +0000
commit293dbe267abe0a48f3f5f16e929d09bd0bc6198d (patch)
tree45a84e08e20624c5cc8c1516a0b16218bb57a21f
parentfb460f8800f4999c8b526f2b1931deb05416f455 (diff)
[FIX] payment: fix invalid param on rpc fail
This commit is related to Task ID 1891721 closes odoo/odoo#27555
-rw-r--r--addons/payment/static/src/js/payment_form.js12
1 files 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.</p>") +
- data.data.message
+ error.data.message
);
});
}