Merge pull request #117 from OCA/revert-103-8.0-rm_write_mo_state

Revert "[8.0] mrp_operations_extension: Remove write MO's state on 'action_start_working'"
This commit is contained in:
Pedro M. Baeza
2016-04-18 13:53:44 +02:00

View File

@@ -133,4 +133,6 @@ 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()