线切割、人工线下加工生成工单异常处理

This commit is contained in:
mgw
2024-11-21 15:36:16 +08:00
parent 25ee849796
commit 1d53f47488

View File

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