From 1d53f47488bf22774449708e55afcf6b4a49cfab Mon Sep 17 00:00:00 2001 From: mgw <1392924357@qq.com> Date: Thu, 21 Nov 2024 15:36:16 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BA=BF=E5=88=87=E5=89=B2=E3=80=81=E4=BA=BA?= =?UTF-8?q?=E5=B7=A5=E7=BA=BF=E4=B8=8B=E5=8A=A0=E5=B7=A5=E7=94=9F=E6=88=90?= =?UTF-8?q?=E5=B7=A5=E5=8D=95=E5=BC=82=E5=B8=B8=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_workorder.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py index c8267b41..db33abac 100644 --- a/sf_manufacturing/models/mrp_workorder.py +++ b/sf_manufacturing/models/mrp_workorder.py @@ -41,7 +41,7 @@ class ResMrpWorkOrder(models.Model): ('装夹预调', '装夹预调'), ('CNC加工', 'CNC加工'), ('解除装夹', '解除装夹'), - ('切割', '切割'), ('表面工艺', '表面工艺'), ('线切割', '线切割') + ('切割', '切割'), ('表面工艺', '表面工艺'), ('线切割', '线切割'), ('人工线下加工', '人工线下加工') ], string="工序类型") results = fields.Char('结果') state = fields.Selection([ @@ -382,8 +382,11 @@ class ResMrpWorkOrder(models.Model): 保存名称 """ for record in self: - tem_name = record.production_id.name.replace('/', '_') - record.save_name = tem_name + '_' + record.processing_panel + if record.processing_panel: + tem_name = record.production_id.name.replace('/', '_') + record.save_name = tem_name + '_' + record.processing_panel + else: + record.save_name = '' schedule_state = fields.Selection(related='production_id.schedule_state', store=True) # 工件装夹信息