From a0cb8675df27f9517c4c6e0e76a5c21e09b36dbb Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Wed, 11 Sep 2013 20:26:15 +0530 Subject: [PATCH] [IMP] Improved code bzr revid: psa@tinyerp.com-20130911145615-wzy1kmajr7j1731y --- addons/mrp/mrp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index 9b6b3e28d28..377b90c4458 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -662,9 +662,9 @@ class mrp_production(osv.osv): for production in self.browse(cr, uid, ids, context=context): if not production.move_created_ids: produce_move_id = self._make_production_produce_line(cr, uid, production, context=context) - - for (production_id,name) in self.name_get(cr, uid, ids): - production = self.browse(cr, uid, production_id) + for scheduled in production.product_lines: + self._make_production_line_procurement(cr, uid, scheduled, False, context=context) + if production.move_prod_id and production.move_prod_id.location_id.id != production.location_dest_id.id: move_obj.write(cr, uid, [production.move_prod_id.id], {'location_id': production.location_dest_id.id})