修复“装夹预调工单没有测量数据时点击左上角的【完成】按钮直接完成工单了”
This commit is contained in:
@@ -1179,7 +1179,7 @@ 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 and record.X_deviation_angle > 0:
|
||||
if not record.material_center_point or record.X_deviation_angle <= 0:
|
||||
raise UserError("坯料中心点为空或X偏差角度小于等于0")
|
||||
record.process_state = '待加工'
|
||||
# record.write({'process_state': '待加工'})
|
||||
|
||||
Reference in New Issue
Block a user