[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
This commit is contained in:
Goffin Simon 2015-08-27 16:30:33 +02:00
parent f310a82a20
commit f4e6dba097
1 changed files with 4 additions and 0 deletions

View File

@ -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;