调整记录匹配条件;优化排程单状态变化

This commit is contained in:
mgw
2024-09-23 14:29:52 +08:00
parent 15981aadf1
commit e9ab4270a9
2 changed files with 14 additions and 5 deletions

View File

@@ -1082,6 +1082,12 @@ class ResMrpWorkOrder(models.Model):
# 重写工单开始按钮方法
def button_start(self):
if self.routing_type == 'CNC加工':
self.env['sf.production.plan'].sudo().search([('name', '=', self.production_id.name)]).write({
'state': 'processing',
'actual_start_time': datetime.now()
})
if self.routing_type == '装夹预调':
# 判断是否有坯料的序列号信息
boolean = False