取消自动返工时修改制造订单状态

This commit is contained in:
yuxianghui
2024-12-26 13:54:59 +08:00
parent 40865b7c6c
commit b03eafcf94

View File

@@ -198,8 +198,8 @@ class MrpProduction(models.Model):
logging.info('cnc用刀校验到无效刀自动调用重新编程方法update_programming_state()')
self[0].update_programming_state()
self[0].write({'is_rework': False})
# 修改制造订单 编程状态变为“编程中” 制造订单状态为‘返工’
self.write({'programming_state': '编程中', 'work_state': '编程中', 'state': 'rework'})
# 修改制造订单 编程状态变为“编程中”
self.write({'programming_state': '编程中', 'work_state': '编程中'})
self[0].workorder_ids.filtered(
lambda a: a.name == '装夹预调' and a.state not in ['rework', 'done', 'cancel'])._compute_state()
if missing_tool_1: