diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index 0b8ab70a9c0..d8e53066c1e 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -899,7 +899,6 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa }); this.updatePaymentSummary(); - this.$('.paymentline-amout input').last().focus(); }, close: function(){ this._super(); @@ -946,6 +945,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa self.deleteLine(r); }); x.appendTo(this.$('#paymentlines')); + this.$('.paymentline-amount input:last').focus(); }, renderElement: function() { this._super(); @@ -975,6 +975,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa if(this.pos_widget.action_bar){ this.pos_widget.action_bar.set_button_disabled('validation', remaining > 0); } + this.$('.paymentline-amount input:last').focus(); }, set_numpad_state: function(numpadState) { if (this.numpadState) { diff --git a/addons/point_of_sale/static/src/js/widgets.js b/addons/point_of_sale/static/src/js/widgets.js index bc5f29601a8..94d6a5dc57e 100644 --- a/addons/point_of_sale/static/src/js/widgets.js +++ b/addons/point_of_sale/static/src/js/widgets.js @@ -298,8 +298,7 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa this.payment_line.bind('change', this.changedAmount, this); }, changeAmount: function(event) { - var newAmount; - newAmount = event.currentTarget.value; + var newAmount = event.currentTarget.value; if (newAmount && !isNaN(newAmount)) { this.amount = parseFloat(newAmount); this.payment_line.set_amount(this.amount);