From 40865b7c6c5fbfb16729d5f08836768537ce0876 Mon Sep 17 00:00:00 2001 From: yuxianghui <3437689193@qq.com> Date: Thu, 26 Dec 2024 13:24:04 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=88=B6=E9=80=A0?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=8A=9F=E8=83=BD=E5=88=80=E5=85=B7=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E4=B8=BA=E6=97=A0=E6=95=88=E5=88=80=E6=97=B6=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E8=BF=94=E5=B7=A5=E4=BF=AE=E6=94=B9=E5=88=B6=E9=80=A0?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=9A=84=E7=8A=B6=E6=80=81=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_production.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sf_manufacturing/models/mrp_production.py b/sf_manufacturing/models/mrp_production.py index ed117589..edd2b818 100644 --- a/sf_manufacturing/models/mrp_production.py +++ b/sf_manufacturing/models/mrp_production.py @@ -372,14 +372,10 @@ class MrpProduction(models.Model): if any(dr.test_results == '报废' and dr.handle_result == '已处理' for dr in production.detection_result_ids): production.state = 'cancel' - # 如果制造订单的功能刀具为【无效刀】则制造订单状态改为返工 - if production.tool_state == '2': - production.state = 'rework' if production.workorder_ids and all(wo_state in ('done', 'rework', 'cancel') for wo_state in production.workorder_ids.mapped('state')): if production.state not in ['scrap', 'rework', 'cancel']: production.state = 'done' - # 退回调整 def technology_back_adjust(self): process_parameters = [] From b03eafcf9476c0a89a9d5f0d12d30d08dd1f671d Mon Sep 17 00:00:00 2001 From: yuxianghui <3437689193@qq.com> Date: Thu, 26 Dec 2024 13:54:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=8F=96=E6=B6=88=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E8=BF=94=E5=B7=A5=E6=97=B6=E4=BF=AE=E6=94=B9=E5=88=B6=E9=80=A0?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_tool_management/models/mrp_workorder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sf_tool_management/models/mrp_workorder.py b/sf_tool_management/models/mrp_workorder.py index 25ccc460..655d759f 100644 --- a/sf_tool_management/models/mrp_workorder.py +++ b/sf_tool_management/models/mrp_workorder.py @@ -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: