调整数据源
This commit is contained in:
@@ -1646,7 +1646,9 @@ class sf_programming_record(models.Model):
|
||||
# 编号、编程原因、编程方式、当前编程次数、目标制造单号、申请时间、下发时间
|
||||
number = fields.Char('编号')
|
||||
reason = fields.Text('重新编程原因')
|
||||
programming_method = fields.Selection([('人工编程', '人工编程'), ('自动编程', '自动编程')], string="编程方式")
|
||||
programming_method = fields.Selection([
|
||||
('auto', '自动'),
|
||||
('manual operation', '人工')], string="编程方式")
|
||||
current_programming_count = fields.Integer('当前编程次数')
|
||||
target_production_id = fields.Char('目标制造单号')
|
||||
apply_time = fields.Datetime('申请时间')
|
||||
|
||||
@@ -27,7 +27,6 @@ class sf_programming_reason(models.TransientModel):
|
||||
{'programming_state': '编程中', 'work_state': '编程中'})
|
||||
|
||||
cloud_programming = self.production_id._cron_get_programming_state()
|
||||
|
||||
self.production_id.programming_record_ids.create({
|
||||
'number': len(self.production_id.programming_record_ids) + 1,
|
||||
'production_id': self.production_id.id,
|
||||
@@ -35,8 +34,8 @@ class sf_programming_reason(models.TransientModel):
|
||||
'programming_method': cloud_programming['programme_way'],
|
||||
'current_programming_count': cloud_programming['reprogramming_num'],
|
||||
'target_production_id': cloud_programming['production_order_no'],
|
||||
'apply_time': self._context.get('apply_time'),
|
||||
'send_time': cloud_programming['programming_time'],
|
||||
'apply_time': self._context.get('default_apply_time'),
|
||||
'send_time': cloud_programming['send_time'],
|
||||
})
|
||||
|
||||
# 返回弹窗提示“已下达编程任务和消息,请等待编程单下发”
|
||||
|
||||
Reference in New Issue
Block a user