Production : Source location of the BOM

Use the source location defined on the current MO's routing not directly on the BOM
This commit is contained in:
Najlaâ El Khayat 2014-06-19 14:51:32 +02:00
parent cdf87a2063
commit e7285c6e1d
1 changed files with 2 additions and 2 deletions

View File

@ -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)