diff --git a/pos_payment_terminal/models/pos_order.py b/pos_payment_terminal/models/pos_order.py
index a0d0b66b..7313ff5e 100644
--- a/pos_payment_terminal/models/pos_order.py
+++ b/pos_payment_terminal/models/pos_order.py
@@ -4,7 +4,7 @@
from collections import defaultdict
import logging
-from odoo import models, api
+from openerp import models, api
_logger = logging.getLogger(__name__)
@@ -40,6 +40,7 @@ class PosOrder(models.Model):
_logger.error("Error matching transactions to payments: %s",
e.args[0])
+ @api.model
def _process_order(self, pos_order):
if pos_order.get('transactions'):
self._match_transactions_to_payments(pos_order)
diff --git a/pos_payment_terminal/static/src/js/pos_payment_terminal.js b/pos_payment_terminal/static/src/js/pos_payment_terminal.js
index a0b24a39..493f74f7 100755
--- a/pos_payment_terminal/static/src/js/pos_payment_terminal.js
+++ b/pos_payment_terminal/static/src/js/pos_payment_terminal.js
@@ -80,7 +80,7 @@ odoo.define('pos_payment_terminal.pos_payment_terminal', function (require) {
screens.PaymentScreenWidget.include({
render_paymentlines : function(){
this._super.apply(this, arguments);
- var self = this;
+ var self = this;
this.$('.paymentlines-container').unbind('click').on('click', '.payment-terminal-transaction-start', function(event){
// Why this "on" thing links severaltime the button to the action if I don't use "unlink" to reset the button links before ?
//console.log(event.target);
@@ -91,11 +91,12 @@ odoo.define('pos_payment_terminal.pos_payment_terminal', function (require) {
},
order_changes: function(){
this._super.apply(this, arguments);
+ var self = this;
var order = this.pos.get_order();
if (!order) {
return;
} else if (order.in_transaction) {
- self.$('.next').html('
');
+ self.$('.next').html('
');
} else {
self.$('.next').html('Validate ');
}