修改订单状态

This commit is contained in:
mgw
2024-07-11 11:22:25 +08:00
parent 79e3006cdb
commit e02f792300
2 changed files with 5 additions and 1 deletions

View File

@@ -122,6 +122,9 @@ class MrpProduction(models.Model):
if production.state == 'progress':
if all(wo_state not in ('progress', 'done') for wo_state in production.workorder_ids.mapped('state')):
production.state = 'pending_cam'
if production.state == 'pending_cam':
if all(wo_state in 'done' for wo_state in production.workorder_ids.mapped('state')):
production.state = 'done'
def action_check(self):
"""