修复验证代码

This commit is contained in:
mgw
2024-08-29 17:52:56 +08:00
parent fcacf609e9
commit 778896a670

View File

@@ -1169,8 +1169,8 @@ class ResMrpWorkOrder(models.Model):
if not record.rfid_code and record.is_rework is False:
raise UserError("请扫RFID码进行绑定")
if record.is_rework is False:
if not record.material_center_point or record.X_deviation_angle <= 0:
raise UserError("请对前置三元检测定位参数进行计算定位")
if not record.material_center_point and record.X_deviation_angle > 0:
raise UserError("坯料中心点为空或X偏差角度小于等于0")
record.process_state = '待加工'
# record.write({'process_state': '待加工'})
record.production_id.process_state = '待加工'