From 0426c3ee8cccf47e4b1a12594bfaf4bb8a42f98a Mon Sep 17 00:00:00 2001 From: "Dhruti Shastri (OpenERP)" Date: Wed, 5 Jun 2013 10:43:04 +0530 Subject: [PATCH] [stock] : Referece for Chained Location always set to False(case: 593003) bzr revid: dhs@tinyerp.com-20130605051304-7jzwz8sfmzuo616k --- addons/stock/stock.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 277c9c39657..c042ed1ac29 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2046,7 +2046,10 @@ class stock_move(osv.osv): ptype = todo[0][1][5] and todo[0][1][5] or location_obj.picking_type_get(cr, uid, todo[0][0].location_dest_id, todo[0][1][0]) if picking: # name of new picking according to its type - new_pick_name = seq_obj.get(cr, uid, 'stock.picking.' + ptype) + if ptype == 'internal': + new_pick_name = seq_obj.get(cr, uid,'stock.picking') + else : + new_pick_name = seq_obj.get(cr, uid, 'stock.picking.' + ptype) pickid = self._create_chained_picking(cr, uid, new_pick_name, picking, ptype, todo, context=context) # Need to check name of old picking because it always considers picking as "OUT" when created from Sales Order old_ptype = location_obj.picking_type_get(cr, uid, picking.move_lines[0].location_id, picking.move_lines[0].location_dest_id)