summaryrefslogtreecommitdiff
path: root/addons/website_quote/static/src/js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/website_quote/static/src/js')
-rw-r--r--addons/website_quote/static/src/js/website_quotation.js42
1 files changed, 0 insertions, 42 deletions
diff --git a/addons/website_quote/static/src/js/website_quotation.js b/addons/website_quote/static/src/js/website_quotation.js
index a6e1b701c5e..afe84e5a57c 100644
--- a/addons/website_quote/static/src/js/website_quotation.js
+++ b/addons/website_quote/static/src/js/website_quotation.js
@@ -4,7 +4,6 @@ odoo.define('website_quote.website_quote', function (require) {
var ajax = require('web.ajax');
var config = require('web.config');
var Widget = require('web.Widget');
-var website = require('website.website');
if(!$('.o_website_quote').length) {
return $.Deferred().reject("DOM doesn't contain '.o_website_quote'");
@@ -200,44 +199,3 @@ if(!$('.o_website_quote').length) {
},
});
});
-
-odoo.define('website_quote.payment_method', function (require) {
-'use strict';
-
- require('website.website');
- var ajax = require('web.ajax');
-
- if(!$('#payment_method').length) {
- return $.Deferred().reject("DOM doesn't contain '#payment_method'");
- }
-
- // dbo note: website_sale code for payment
- // if we standardize payment somehow, this should disappear
- // When choosing an acquirer, display its Pay Now button
- var $payment = $("#payment_method");
- $payment.on("click", "input[name='acquirer']", function (ev) {
- var payment_id = $(ev.currentTarget).val();
- $("div.oe_quote_acquirer_button[data-id]", $payment).addClass("hidden");
- $("div.oe_quote_acquirer_button[data-id='"+payment_id+"']", $payment).removeClass("hidden");
- })
- .find("input[name='acquirer']:checked").click();
-
- // When clicking on payment button: create the tx using json then continue to the acquirer
- $('.oe_quote_acquirer_button').on("click", 'button[type="submit"],button[name="submit"]', function (ev) {
- ev.preventDefault();
- ev.stopPropagation();
- var $form = $(ev.currentTarget).parents('form');
- var acquirer_id = $(ev.currentTarget).parents('.oe_quote_acquirer_button').first().data('id');
- if (! acquirer_id) {
- return false;
- }
- var href = $(location).attr("href");
- var order_id = href.match(/quote\/([0-9]+)/)[1];
- var token = href.match(/quote\/[0-9]+\/([^\/?]*)/);
- token = token ? token[1] : '';
- ajax.jsonRpc('/quote/' + order_id +'/transaction/' + acquirer_id + (token ? '/' + token : ''), 'call', {}).then(function (data) {
- $form.html(data);
- $form.submit();
- });
- });
-});