1、制造订单返工按钮添加新的显示条件;2、优化返工流程
This commit is contained in:
@@ -1248,6 +1248,8 @@ class MrpProduction(models.Model):
|
||||
cloud_programming = None
|
||||
if self.programming_state in ['已编程']:
|
||||
cloud_programming = self._cron_get_programming_state()
|
||||
elif self.programming_state is False:
|
||||
cloud_programming = {}
|
||||
result_ids = self.detection_result_ids.filtered(lambda dr: dr.handle_result == '待处理')
|
||||
work_id_list = []
|
||||
if result_ids:
|
||||
@@ -1268,9 +1270,9 @@ class MrpProduction(models.Model):
|
||||
'default_production_id': self.id,
|
||||
'default_workorder_ids': workorder_ids.ids if workorder_ids.ids != [] else self.workorder_ids.ids,
|
||||
'default_hidden_workorder_ids': ','.join(map(str, work_id_list)) if work_id_list != [] else '',
|
||||
'default_reprogramming_num': cloud_programming['reprogramming_num'],
|
||||
'default_programming_state': cloud_programming['programming_state'],
|
||||
'default_is_reprogramming': True if cloud_programming['programming_state'] in ['已下发'] else False
|
||||
'default_reprogramming_num': cloud_programming.get('reprogramming_num'),
|
||||
'default_programming_state': cloud_programming.get('programming_state'),
|
||||
'default_is_reprogramming': True if cloud_programming.get('programming_state') in ['已下发'] else False
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user