From ed2b1ce175827be535bd8a5614a50929f0663eab Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Tue, 13 Dec 2011 15:31:35 +0100 Subject: [PATCH] [fix] problem with order lines, was changing selection bzr revid: nicolas.vanhoren@openerp.com-20111213143135-1ue0wg2puwduchps --- addons/point_of_sale/static/src/js/pos.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/addons/point_of_sale/static/src/js/pos.js b/addons/point_of_sale/static/src/js/pos.js index 098cea69700..6b01dfc0c9a 100644 --- a/addons/point_of_sale/static/src/js/pos.js +++ b/addons/point_of_sale/static/src/js/pos.js @@ -703,13 +703,12 @@ openerp.point_of_sale = function(db) { changeSelectedOrder: function() { this.currentOrderLines.unbind(); this.bindOrderLineEvents(); - return this.render_element(); + this.render_element(); }, bindOrderLineEvents: function() { this.currentOrderLines = (this.shop.get('selectedOrder')).get('orderLines'); this.currentOrderLines.bind('add', this.addLine, this); - this.currentOrderLines.bind('change', this.render_element, this); - return this.currentOrderLines.bind('remove', this.render, this); + this.currentOrderLines.bind('remove', this.render_element, this); }, addLine: function(newLine) { var line = new OrderlineWidget(null, { @@ -718,7 +717,7 @@ openerp.point_of_sale = function(db) { numpadState: this.numpadState }); line.appendTo(this.$element); - return this.updateSummary(); + this.updateSummary(); }, render_element: function() { this.$element.empty(); @@ -730,7 +729,7 @@ openerp.point_of_sale = function(db) { }); line.appendTo(this.$element); }, this)); - return this.updateSummary(); + this.updateSummary(); }, updateSummary: function() { var currentOrder, tax, total, totalTaxExcluded; @@ -740,7 +739,7 @@ openerp.point_of_sale = function(db) { tax = currentOrder.getTax(); $('#subtotal').html(totalTaxExcluded.toFixed(2)).hide().fadeIn(); $('#tax').html(tax.toFixed(2)).hide().fadeIn(); - return $('#total').html(total.toFixed(2)).hide().fadeIn(); + $('#total').html(total.toFixed(2)).hide().fadeIn(); }, }); /*