mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[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.
This commit is contained in:
@@ -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 '
|
||||
|
||||
Reference in New Issue
Block a user