From 8974ee4d4e7d7720b88b4ab14e55eb7834bf380b Mon Sep 17 00:00:00 2001 From: "hbrunn@therp.nl" Date: Sun, 6 Jul 2014 17:39:30 +0200 Subject: [PATCH] [FIX] write product_qty and product_uos_qty through ORM, thereby respecting decimal precision --- addons/stock/stock.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 26647d8..39d5bb1 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2235,7 +2235,11 @@ class stock_move(osv.osv): pickings[move.picking_id.id] = 1 r = res.pop(0) product_uos_qty = self.pool.get('stock.move').onchange_quantity(cr, uid, [move.id], move.product_id.id, r[0], move.product_id.uom_id.id, move.product_id.uos_id.id)['value']['product_uos_qty'] - cr.execute('update stock_move set location_id=%s, product_qty=%s, product_uos_qty=%s where id=%s', (r[1], r[0],product_uos_qty, move.id)) + move.write({ + 'location_id': r[1], + 'product_qty': r[0], + 'product_uos_qty': product_uos_qty, + }) while res: r = res.pop(0) -- 1.7.10.4