From f4e6dba0973dcc2dda009f4cd0069a5d0e2588c4 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Thu, 27 Aug 2015 16:30:33 +0200 Subject: [PATCH] [FIX] point_of_sale: barcode_reader In the POS, when trying to add a new product in an order with an already printed ticket, the added product must be add in a new order. opw:647499 --- addons/point_of_sale/static/src/js/models.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index f647a679571..4a6f57e33b4 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -1060,6 +1060,10 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal this.selectLine(this.getLastOrderline()); }, addProduct: function(product, options){ + if(this._printed){ + this.destroy(); + return this.pos.get('selectedOrder').addProduct(product, options); + } options = options || {}; var attr = JSON.parse(JSON.stringify(product)); attr.pos = this.pos;