[FIX] stock: theoretical quantity

The default real quantity must be the theoretical quantity.
This commit is contained in:
Goffin Simon 2015-06-12 14:42:49 +02:00
parent 8ae67f6a54
commit cc6c4f2408
1 changed files with 1 additions and 3 deletions

View File

@ -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):