修复制造订单状态

This commit is contained in:
mgw
2024-07-16 16:31:18 +08:00
parent 6a2ff72dce
commit 81158e2fb4

View File

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