From 89041fafced11ac8e5b3a03682e0807129eb877c Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Wed, 25 Jun 2014 18:17:32 +0200 Subject: [PATCH] [FIX] Take into account that location_id of routing can be empty --- addons/mrp/mrp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index fdca13cd5fd..e13d8bb2c89 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -1092,7 +1092,7 @@ class mrp_production(osv.osv): # Take routing location as a Source Location. source_location_id = production.location_src_id.id prev_move= False - if production.bom_id.routing_id and production.bom_id.routing_id.location_id.id != source_location_id: + if production.bom_id.routing_id and production.bom_id.routing_id.location_id and production.bom_id.routing_id.location_id.id != source_location_id: source_location2_id = source_location_id source_location_id = production.bom_id.routing_id.location_id.id prev_move = self._create_previous_move(cr, uid, production, product, uom_id, qty, uos_id, uos_qty, source_location2_id, source_location_id, context=context)