From 52abc82b6c42830c72349d8bd380a035837d22af Mon Sep 17 00:00:00 2001 From: campos Date: Wed, 26 Nov 2014 13:00:50 +0100 Subject: [PATCH] [FIX] mrp_operations_extension: When no routing_id is defined in the manufacturing order move Final Product to Stock check in operation is not controlled. --- mrp_operations_extension/models/mrp_production.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mrp_operations_extension/models/mrp_production.py b/mrp_operations_extension/models/mrp_production.py index f9d9ca5e9..1fd8b98cb 100644 --- a/mrp_operations_extension/models/mrp_production.py +++ b/mrp_operations_extension/models/mrp_production.py @@ -48,10 +48,13 @@ class MrpProduction(models.Model): @api.multi def action_confirm(self): produce = False - for workcenter_line in self.workcenter_lines: - if workcenter_line.do_production: - produce = True - break + if not self.routing_id: + produce = True + else: + for workcenter_line in self.workcenter_lines: + if workcenter_line.do_production: + produce = True + break if not produce: raise exceptions.Warning( _('Produce Operation'), _('At least one operation '