修复“已经排程的制造订单取消排程后状态没有回退”

This commit is contained in:
mgw
2024-07-04 16:19:20 +08:00
parent ae6764495e
commit b0da7977f5

View File

@@ -114,6 +114,8 @@ class MrpProduction(models.Model):
if (
production.state == 'to_close' or production.state == 'progress') and production.schedule_state == '未排':
production.state = 'confirmed'
elif production.state == 'pending_cam' and production.schedule_state == '未排':
production.state = 'confirmed'
elif production.state == 'to_close' and production.schedule_state == '已排':
production.state = 'pending_cam'