summaryrefslogtreecommitdiff
path: root/addons/payment_stripe/static/src
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2016-11-03 12:03:22 +0100
committerJoren Van Onder <jov@odoo.com>2016-11-03 12:58:02 -0700
commit83d1bb8df29451dcb41ac2b22ec022e41d35262d (patch)
tree5fdd86db6d3135829014cbfbd951932e1cf3de7a /addons/payment_stripe/static/src
parentc54dbe2a924d70bc57eaebddd9eef37d45ffeb25 (diff)
[FIX] payment_stripe, website_quote, website_sale: update SO
! This is a backport from 10.0 (9010ed0a) ! opw-693017 Original commit message: A side effect of commit b9d1239effb if that the method `sale_get_order`, which is used to retrieve the SO, will also update information on this SO (change partner, change pricelist...). We therefore need another way to retrieve the SO. opw-692919
Diffstat (limited to 'addons/payment_stripe/static/src')
-rw-r--r--addons/payment_stripe/static/src/js/stripe.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/addons/payment_stripe/static/src/js/stripe.js b/addons/payment_stripe/static/src/js/stripe.js
index 314fc764add..a6cc6ad5637 100644
--- a/addons/payment_stripe/static/src/js/stripe.js
+++ b/addons/payment_stripe/static/src/js/stripe.js
@@ -46,8 +46,14 @@ odoo.define('payment_stripe.stripe', function(require) {
return false;
}
+ var so_token = $("input[name='token']").val();
+ var so_id = $("input[name='return_url']").val().match(/quote\/([0-9]+)/);
+ if (so_id) {
+ so_id = parseInt(so_id[1]);
+ }
+
e.preventDefault();
- ajax.jsonRpc('/shop/payment/transaction/' + acquirer_id, 'call', {}).then(function (data) {
+ ajax.jsonRpc('/shop/payment/transaction/' + acquirer_id, 'call', {'so_id': so_id, 'so_token': so_token}).then(function (data) {
$form.html(data);
handler.open({
name: $("input[name='merchant']").val(),