From 8e8d370ba9213a74e8acec69d47515e65bc76b13 Mon Sep 17 00:00:00 2001 From: Jagdish Panchal Date: Fri, 3 May 2013 12:47:54 +0530 Subject: [PATCH] [IMP] improve code and remove unwated change bzr revid: jap@tinyerp.com-20130503071754-vwok8xpjcjo63m9o --- addons/mrp/mrp.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index 2c52ca87924..38c564961bd 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -841,8 +841,8 @@ class mrp_production(osv.osv): if not self.action_compute(cr, uid, [production.id]): res = False for componant in production.bom_id.bom_lines: - if componant.product_id.type == 'service' and not production.move_lines and not production.move_lines2: - res=False + if componant.product_id.type == 'service' and not production.move_lines: + res=True return res def _get_auto_picking(self, cr, uid, production): @@ -989,9 +989,6 @@ class mrp_production(osv.osv): for production in self.browse(cr, uid, ids, context=context): shipment_id = self._make_production_internal_shipment(cr, uid, production, context=context) produce_move_id = self._make_production_produce_line(cr, uid, production, context=context) - for componant in production.bom_id.bom_lines: - if componant.product_id.type == 'service' and not production.move_lines and not production.move_lines2: - wf_service.trg_validate(uid, 'mrp.production', shipment_id, 'button_confirm', cr) # 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: