[IMP] restaurant: discard kitchen order changes when splitting the bill.

This commit is contained in:
Frederic van der Essen 2014-07-29 15:29:28 +02:00
parent 09bf85ae02
commit d30dc934f6
1 changed files with 13 additions and 0 deletions

View File

@ -122,6 +122,19 @@ function openerp_restaurant_splitbill(instance, module){
}
neworder.addPaymentline(cashregister);
neworder.set_screen_data('screen','payment');
// for the kitchen printer we assume that everything
// has already been sent to the kitchen before splitting
// the bill. So we save all changes both for the old
// order and for the new one. This is not entirely correct
// but avoids flooding the kitchen with unnecessary orders.
// Not sure what to do in this case.
if ( neworder.saveChanges ) {
order.saveChanges();
neworder.saveChanges();
}
this.pos.get('orders').add(neworder);
this.pos.set('selectedOrder',neworder);
}