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) # 工件装夹信息