From cc6c4f240880f639a36f4e2c3e12f1140fd3e84d Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Fri, 12 Jun 2015 14:42:49 +0200 Subject: [PATCH] [FIX] stock: theoretical quantity The default real quantity must be the theoretical quantity. --- addons/stock/stock.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 4248141a083..0f3adf01398 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2899,12 +2899,10 @@ class stock_inventory_line(osv.osv): ('product_id','=', product_id), ('owner_id', '=', partner_id), ('package_id', '=', package_id)] quants = quant_obj.search(cr, uid, dom, context=context) th_qty = sum([x.qty for x in quant_obj.browse(cr, uid, quants, context=context)]) - qty = product.qty_available if product_id and uom_id and product.uom_id.id != uom_id: th_qty = uom_obj._compute_qty(cr, uid, product.uom_id.id, th_qty, uom_id) - qty = uom_obj._compute_qty(cr, uid, product.uom_id.id, qty, uom_id) res['value']['theoretical_qty'] = th_qty - res['value']['product_qty'] = qty + res['value']['product_qty'] = th_qty return res def _resolve_inventory_line(self, cr, uid, inventory_line, context=None):