修复工单完成时制造订单未完成

This commit is contained in:
jinling.yang
2024-05-18 17:30:22 +08:00
parent d7bcb0e4f3
commit 80cd385df4

View File

@@ -899,7 +899,7 @@ class ResMrpWorkOrder(models.Model):
for workorder in record.production_id.workorder_ids:
if workorder.state != 'done':
is_production_id = False
if is_production_id == True and record.name == '解除装夹':
if is_production_id is True and record.routing_type in ['解除装夹', '表面工艺']:
for workorder in record.production_id.workorder_ids:
workorder.rfid_code_old = workorder.rfid_code
workorder.rfid_code = None