From 2a7c13e7bbad6447faf987e6fda277b18330cc23 Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Tue, 12 Aug 2014 15:18:34 +0200 Subject: [PATCH] [IMP] Not necessary as operations are computed, but more logical to do action_pack as dropdown(process) --- addons/stock/stock.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index d6d62796a38..87bc245361f 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1384,8 +1384,8 @@ class stock_picking(osv.osv): stock_operation_obj.write(cr, uid, operation.id, {'product_qty': operation.product_qty - operation.qty_done,'qty_done': 0, 'lot_id': False}, context=context) op = stock_operation_obj.browse(cr, uid, new_operation, context=context) pack_operation_ids.append(op.id) - for record in op.linked_move_operation_ids: - stock_move_obj.check_tracking(cr, uid, record.move_id, not op.product_id and op.package_id.id or op.lot_id.id, context=context) + if op.product_id and op.location_id and op.location_dest_id: + stock_move_obj.check_tracking_product(cr, uid, op.product_id, op.lot_id.id, op.location_id, op.location_dest_id, context=context) package_id = package_obj.create(cr, uid, {}, context=context) stock_operation_obj.write(cr, uid, pack_operation_ids, {'result_package_id': package_id}, context=context) return True @@ -3796,7 +3796,7 @@ class stock_pack_operation(osv.osv): move_obj = self.pool.get("stock.move") for pack_op in self.browse(cr, uid, ids, context=None): if pack_op.product_id and pack_op.location_id and pack_op.location_dest_id: - move_obj.check_tracking_product(cr, uid, pack_op.product_id, pack_op.lot_id.id, pack_op.location_id, pack_op.location_dest_id, context=None) + move_obj.check_tracking_product(cr, uid, pack_op.product_id, pack_op.lot_id.id, pack_op.location_id, pack_op.location_dest_id, context=context) op = pack_op.id if pack_op.qty_done < pack_op.product_qty: # we split the operation in two