summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGoffin Simon <sig@odoo.com>2015-08-27 16:30:33 +0200
committerGoffin Simon <sig@odoo.com>2015-08-31 13:43:33 +0200
commitf4e6dba0973dcc2dda009f4cd0069a5d0e2588c4 (patch)
tree9dcbde6eae7e1b312700f5a970ae8c3bb7eef1a4
parentf310a82a20273835c21151b4f83bf7275f5e58f2 (diff)
[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
-rw-r--r--addons/point_of_sale/static/src/js/models.js4
1 files changed, 4 insertions, 0 deletions
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;