From e07e932748bfeb70c0f0e42a35aa4321eb26992c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 26 Mar 2009 00:47:22 +0100 Subject: [PATCH] Don't round compute_qty in set_state_packed for internal quantity counter for issue899 --- packing.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packing.py b/packing.py index 0fada4856d..087e9ff8f2 100644 --- a/packing.py +++ b/packing.py @@ -667,7 +667,7 @@ class PackingOut(ModelWorkflow, ModelSQL, ModelView): if move.state == 'cancel': continue quantity = uom_obj.compute_qty( cursor, user, move.uom, move.quantity, move.product.default_uom, - context=context) + round=False, context=context) outgoing_qty.setdefault(move.product.id, 0.0) outgoing_qty[move.product.id] += quantity @@ -675,7 +675,7 @@ class PackingOut(ModelWorkflow, ModelSQL, ModelView): if move.state == 'cancel': continue qty_default_uom = uom_obj.compute_qty( cursor, user, move.uom, move.quantity, move.product.default_uom, - context=context) + round=False, context=context) # Check if the outgoing move doesn't exist already if outgoing_qty.get(move.product.id): # If it exist, decrease the sum @@ -721,7 +721,7 @@ class PackingOut(ModelWorkflow, ModelSQL, ModelView): }, context=context) removed_qty = uom_obj.compute_qty( cursor, user, move.uom, min(exc_qty, move.quantity), - move.product.default_uom, context=context) + move.product.default_uom, round=False, context=context) outgoing_qty[move.product.id] -= removed_qty move_obj.write(cursor, user, [x.id for x in packing.outgoing_moves