[8.0] mrp_operations_extension: Remove write state 'action_start_working'

Modify state on WO it isn't necessary at all because the mrp_operations
changes the state to in_production through the workflow.
This commit is contained in:
Zambu
2016-03-01 17:14:10 +01:00
parent 5b8eb4c152
commit 01c75aa18a

View File

@@ -133,6 +133,4 @@ class MrpProductionWorkcenterLine(models.Model):
['assigned', 'cancel', 'done']):
raise exceptions.Warning(
_("Missing materials to start the production"))
if workorder.production_id.state in ('confirmed', 'ready'):
workorder.production_id.state = 'in_production'
return super(MrpProductionWorkcenterLine, self).action_start_working()