[FIX] point of sale: order undefined

If the line is linked to an order, this line must be removed in this order.
This commit is contained in:
Tam Vu
2015-06-26 14:02:59 +02:00
committed by Goffin Simon
parent 6d5f5f4470
commit 6cb3fe43ed
+1 -1
View File
@@ -1051,7 +1051,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
},
addOrderline: function(line){
if(line.order){
order.removeOrderline(line);
line.order.removeOrderline(line);
}
line.order = this;
this.get('orderLines').add(line);