From 778896a6707fbe12b7427133a332bd88f6600dd1 Mon Sep 17 00:00:00 2001 From: mgw <1392924357@qq.com> Date: Thu, 29 Aug 2024 17:52:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=AA=8C=E8=AF=81=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_workorder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py index d6a5ea9f..c3842d30 100644 --- a/sf_manufacturing/models/mrp_workorder.py +++ b/sf_manufacturing/models/mrp_workorder.py @@ -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 = '待加工'