summaryrefslogtreecommitdiff
path: root/addons/payment/static/src/js/payment_processing.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/payment/static/src/js/payment_processing.js')
-rw-r--r--addons/payment/static/src/js/payment_processing.js32
1 files changed, 11 insertions, 21 deletions
diff --git a/addons/payment/static/src/js/payment_processing.js b/addons/payment/static/src/js/payment_processing.js
index 0fcfbc7ce81..4bad7fcb4ef 100644
--- a/addons/payment/static/src/js/payment_processing.js
+++ b/addons/payment/static/src/js/payment_processing.js
@@ -1,32 +1,22 @@
odoo.define('payment.processing', function (require) {
'use strict';
- var Widget = require('web.Widget');
- var Ajax = require('web.ajax');
- var Core = require('web.core');
- var Qweb = Core.qweb;
- var _t = Core._t;
+ var publicWidget = require('web.public.widget');
+ var ajax = require('web.ajax');
+ var core = require('web.core');
+
+ var _t = core._t;
$.blockUI.defaults.css.border = '0';
$.blockUI.defaults.css["background-color"] = '';
$.blockUI.defaults.overlayCSS["opacity"] = '0.9';
- return Widget.extend({
- /* Members */
- _payment_tx_ids: null,
+ publicWidget.registry.PaymentProcessing = publicWidget.Widget.extend({
+ selector: '.o_payment_processing',
+ xmlDependencies: ['/payment/static/src/xml/payment_processing.xml'],
+
_pollCount: 0,
- /* Events */
- events: {
- },
- /* deps */
- xmlDependencies: ['/payment/static/src/xml/payment_processing.xml'],
- /* Widget overrides */
- init: function (parent, payment_tx_ids) {
- this._super.apply(this, arguments);
- //
- this._payment_tx_ids = payment_tx_ids;
- },
start: function() {
this.displayLoading();
this.poll();
@@ -48,7 +38,7 @@ odoo.define('payment.processing', function (require) {
},
poll: function () {
var self = this;
- Ajax.jsonRpc('/payment/process/poll', 'call', {}).then(function(data) {
+ ajax.jsonRpc('/payment/process/poll', 'call', {}).then(function(data) {
if(data.success === true) {
self.processPolledData(data.transactions);
}
@@ -119,7 +109,7 @@ odoo.define('payment.processing', function (require) {
this.displayContent("payment.display_tx_list", render_values);
},
displayContent: function (xmlid, render_values) {
- var html = Qweb.render(xmlid, render_values);
+ var html = core.qweb.render(xmlid, render_values);
this.$el.find('.o_payment_processing_content').html(html);
},
displayLoading: function () {