[FIX] mrp_operations_extension: Modified action_start_working method on WO to avoid force production without breaking production workflow.

This commit is contained in:
Daniel-CA
2016-04-18 15:49:51 +02:00
parent 2a71f80597
commit 823d851ff9

View File

@@ -133,5 +133,7 @@ class MrpProductionWorkcenterLine(models.Model):
raise exceptions.Warning(
_("Missing materials to start the production"))
if workorder.production_id.state in ('confirmed', 'ready'):
workorder.production_id.signal_workflow('moves_ready')
# bypass force_production method in production order
workorder.production_id.state = 'in_production'
return super(MrpProductionWorkcenterLine, self).action_start_working()