From 5dbdc3ccbedce925381beb6a37d2ed4ea4b2b093 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Tue, 17 Aug 2010 16:32:45 +0530 Subject: [PATCH] [Fix] stock: Fix the location_destination function bzr revid: sbh@tinyerp.com-20100817110245-g4tfa12s6l6o7xk9 --- addons/stock/stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 898ab01135f..244d9574f95 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1391,7 +1391,7 @@ class stock_move(osv.osv): if context.get('move_line', []): if context['move_line'][0]: if isinstance(context['move_line'][0], (tuple, list)): - return context['move_line'][0][2] and context['move_line'][0][2]['location_dest_id'] or False + return context['move_line'][0][2] and context['move_line'][0][2].get('location_dest_id',False) else: move_list = self.pool.get('stock.move').read(cr, uid, context['move_line'][0], ['location_dest_id']) return move_list and move_list['location_dest_id'][0] or False