From e7285c6e1d7aa6df8efeb46dbe508265f8c3669f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Najla=C3=A2=20El=20Khayat?= Date: Thu, 19 Jun 2014 14:51:32 +0200 Subject: [PATCH] Production : Source location of the BOM Use the source location defined on the current MO's routing not directly on the BOM --- addons/mrp/mrp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index 2b5d68177f1..e8e1887caf8 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -1037,8 +1037,8 @@ class mrp_production(osv.osv): # Take routing location as a Source Location. source_location_id = production.location_src_id.id - if production.bom_id.routing_id and production.bom_id.routing_id.location_id: - source_location_id = production.bom_id.routing_id.location_id.id + if production.routing_id and production.routing_id.location_id: + source_location_id = production.routing_id.location_id.id for line in production.product_lines: consume_move_id = self._make_production_consume_line(cr, uid, line, produce_move_id, source_location_id=source_location_id, context=context)