返工操作时工单状态优化

This commit is contained in:
yuxianghui
2024-10-28 10:55:18 +08:00
parent 7814a2b622
commit ba8393a8c7

View File

@@ -200,6 +200,8 @@ class MrpProduction(models.Model):
self[0].write({'is_rework': False})
# 修改制造订单 编程状态变为“编程中” 制造订单状态为‘返工’
self.write({'programming_state': '编程中', 'work_state': '编程中', 'state': 'rework'})
self[0].workorder_ids.filtered(
lambda a: a.name == '装夹预调' and a.state not in ['rework', 'done', 'cancel'])._compute_state()
if missing_tool_1:
logging.info(f'线边、机内缺刀:{missing_tool_1}')
# 修改 修改cnc程序的刀具状态 为 ‘缺刀’