From 28833f070f8431d42c27a2ec28f3fc1c44cc12f1 Mon Sep 17 00:00:00 2001 From: Somesh Khare Date: Wed, 7 Jan 2015 16:47:32 +0530 Subject: [PATCH] [FIX] stock: owner on picking not propagated on quants The owner of an incoming picking was not propagated to the generated quants Fixes #4136, opw 619854 --- addons/stock/stock.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 3939e621095..76263a5a1f8 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1057,6 +1057,7 @@ class stock_picking(osv.osv): 'product_qty': 1.0, 'location_id': pack.location_id.id, 'location_dest_id': quants_suggested_locations[pack_quants[0]], + 'owner_id': picking.owner_id.id, }) #remove the quants inside the package so that they are excluded from the rest of the computation for quant in pack_quants: @@ -1075,7 +1076,7 @@ class stock_picking(osv.osv): if qty <= 0: continue suggested_location_id = _picking_putaway_apply(product) - key = (product.id, False, False, False, picking.location_id.id, suggested_location_id) + key = (product.id, False, False, picking.owner_id.id, picking.location_id.id, suggested_location_id) if qtys_grouped.get(key): qtys_grouped[key] += qty else: