[FIX] stock: theoretical quantity
The default real quantity must be the theoretical quantity.
This commit is contained in:
parent
8ae67f6a54
commit
cc6c4f2408
|
@ -2899,12 +2899,10 @@ class stock_inventory_line(osv.osv):
|
||||||
('product_id','=', product_id), ('owner_id', '=', partner_id), ('package_id', '=', package_id)]
|
('product_id','=', product_id), ('owner_id', '=', partner_id), ('package_id', '=', package_id)]
|
||||||
quants = quant_obj.search(cr, uid, dom, context=context)
|
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)])
|
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:
|
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)
|
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']['theoretical_qty'] = th_qty
|
||||||
res['value']['product_qty'] = qty
|
res['value']['product_qty'] = th_qty
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def _resolve_inventory_line(self, cr, uid, inventory_line, context=None):
|
def _resolve_inventory_line(self, cr, uid, inventory_line, context=None):
|
||||||
|
|
Loading…
Reference in New Issue