From 308dc4c65ef037dfa178f250419ad59b7616d83c Mon Sep 17 00:00:00 2001 From: "Divyesh Makwana (Open ERP)" Date: Thu, 27 Sep 2012 17:45:03 +0530 Subject: [PATCH] [IMP] stock : Set the default value for 'Source Location' and 'Destination Location' in Internal Picking. bzr revid: mdi@tinyerp.com-20120927121503-mmy2lg7ocdfjd7pd --- addons/stock/stock.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index b015a657383..7306176d5f9 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1724,12 +1724,10 @@ class stock_move(osv.osv): location_id = property_out and property_out.id or False else: location_xml_id = False - if picking_type == 'in': + if picking_type in ('in', 'internal'): location_xml_id = 'stock_location_stock' elif picking_type == 'out': location_xml_id = 'stock_location_customers' - elif picking_type == 'internal': - location_xml_id = 'stock_location_stock' if location_xml_id: location_model, location_id = mod_obj.get_object_reference(cr, uid, 'stock', location_xml_id) return location_id @@ -1757,9 +1755,7 @@ class stock_move(osv.osv): location_xml_id = False if picking_type == 'in': location_xml_id = 'stock_location_suppliers' - elif picking_type == 'out': - location_xml_id = 'stock_location_stock' - elif picking_type == 'internal': + elif picking_type in ('out', 'internal'): location_xml_id = 'stock_location_stock' if location_xml_id: location_model, location_id = mod_obj.get_object_reference(cr, uid, 'stock', location_xml_id)