1、质检单通过、失败按钮添加工单为返工时隐藏条件;2、处理夹具入库到夹具房时,夹具查询中夹具可用状态没有变更为可用问题;3、处理后置三元检测选择返工后制造订单状态没有变更为返工的问题

This commit is contained in:
yuxianghui
2025-01-15 11:25:00 +08:00
parent bf3256c4bc
commit 8d5d19ec69
4 changed files with 10 additions and 7 deletions

View File

@@ -363,7 +363,8 @@ class MrpProduction(models.Model):
# if production.state == 'pending_cam':
# if all(wo_state in 'done' for wo_state in production.workorder_ids.mapped('state')):
# production.state = 'done'
if any((wo.test_results == '返工' and wo.state == 'done' and production.programming_state in ['已编程'])
if any((wo.test_results == '返工' and wo.state == 'done' and
(production.programming_state in ['已编程'] or wo.individuation_page_PTD is True))
or (wo.is_rework is True and wo.state == 'done' and production.programming_state in ['编程中', '已编程'])
for wo in production.workorder_ids):
production.state = 'rework'