Accept Merge Request #1149: (feature/优化制造功能 -> develop)

Merge Request: 修复制造订单状态

Created By: @马广威
Accepted By: @马广威
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1149?initial=true
This commit is contained in:
马广威
2024-07-16 16:32:11 +08:00
committed by Coding

View File

@@ -122,9 +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'
# 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):
"""