[FIX] pos_restaurant: changed unit caused issue on splitting
Commit 0fd51c2e6
changed the unit rounding from units from 1 to 0.001,
it was done mainly because it's the default unit and in the interface we
see quantities with 3 decimals after the floating point, so people might
expect to be able to set floating point quantities.
This change caused an issue when splitting a bill in the pos restaurant,
instead of a click being a piece of the product, it was 0.001 part of a
product.
This fix overrides the rounding of units in this case.
closes #6780
opw-639865
This commit is contained in:
parent
75aa699f62
commit
4e8f84053d
|
@ -45,7 +45,7 @@ function openerp_restaurant_splitbill(instance, module){
|
|||
}
|
||||
}else{
|
||||
if( split.quantity < line.get_quantity()){
|
||||
split.quantity += line.get_unit().rounding;
|
||||
split.quantity += line.get_unit().is_unit ? 1 : line.get_unit().rounding;
|
||||
if(split.quantity > line.get_quantity()){
|
||||
split.quantity = line.get_quantity();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue