[FIX] Theoretical quantity for created inventory adjustment should take into account location in context of stock

This commit is contained in:
Josse Colpaert 2014-09-12 16:31:45 +02:00
parent 8aca4094af
commit 21aaec282d
1 changed files with 2 additions and 1 deletions

View File

@ -98,7 +98,8 @@ class stock_change_product_qty(osv.osv_memory):
'product_id': data.product_id.id,
'location_id': data.location_id.id,
'lot_id': data.lot_id.id}, context=context)
th_qty = data.product_id.qty_available
product = data.product_id.with_context(location=data.location_id.id)
th_qty = product.qty_available
line_data = {
'inventory_id': inventory_id,
'product_qty': data.new_quantity,