diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2015-05-20 09:49:52 +0200 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2015-05-20 14:25:24 +0200 |
| commit | 4e8f84053d1f306924a2e5fd99e5cf3fa7a9bf74 (patch) | |
| tree | 77d86940de25ecef9cea379adb6c8975e34833f8 /addons/pos_restaurant/static/src/js/splitbill.js | |
| parent | 75aa699f62e7a42b418befef3a7bd69efcb78be9 (diff) | |
[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
Diffstat (limited to 'addons/pos_restaurant/static/src/js/splitbill.js')
| -rw-r--r-- | addons/pos_restaurant/static/src/js/splitbill.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/pos_restaurant/static/src/js/splitbill.js b/addons/pos_restaurant/static/src/js/splitbill.js index 81591ccc589..ee55402c835 100644 --- a/addons/pos_restaurant/static/src/js/splitbill.js +++ b/addons/pos_restaurant/static/src/js/splitbill.js @@ -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(); } |
