diff --git a/sf_manufacturing/wizard/sf_programming_reason.py b/sf_manufacturing/wizard/sf_programming_reason.py index 5e7ec706..d6744bed 100644 --- a/sf_manufacturing/wizard/sf_programming_reason.py +++ b/sf_manufacturing/wizard/sf_programming_reason.py @@ -35,7 +35,7 @@ class sf_programming_reason(models.TransientModel): 'current_programming_count': cloud_programming['reprogramming_num'], 'target_production_id': cloud_programming['production_order_no'], 'apply_time': self._context.get('default_apply_time'), - 'send_time': cloud_programming['send_time'], + 'send_time': False, }) # 返回弹窗提示“已下达编程任务和消息,请等待编程单下发” diff --git a/sf_manufacturing/wizard/sf_programming_reason_views.xml b/sf_manufacturing/wizard/sf_programming_reason_views.xml index 5b9e15a8..02193bf6 100644 --- a/sf_manufacturing/wizard/sf_programming_reason_views.xml +++ b/sf_manufacturing/wizard/sf_programming_reason_views.xml @@ -25,10 +25,11 @@

已下达编程任务和消息,请等待编程单下发!

+
+
- +
diff --git a/sf_mrs_connect/controllers/controllers.py b/sf_mrs_connect/controllers/controllers.py index 5506e7f6..186cc7a5 100644 --- a/sf_mrs_connect/controllers/controllers.py +++ b/sf_mrs_connect/controllers/controllers.py @@ -100,6 +100,9 @@ class Sf_Mrs_Connect(http.Controller, MultiInheritController): # 更新编程记录 for production in productions: + record_ids_obj = production.programming_record_ids.filtered(lambda r: r.current_programming_count == ret['reprogramming_num']) + if record_ids_obj: + record_ids_obj.write({'send_time': ret['send_time']}) if ret['reprogramming_num'] == 0: production.programming_record_ids.create({ 'number': 1, @@ -108,7 +111,7 @@ class Sf_Mrs_Connect(http.Controller, MultiInheritController): 'programming_method': ret['programme_way'], 'current_programming_count': ret['reprogramming_num'], 'target_production_id': ret['production_order_no'], - 'apply_time': '', + 'apply_time': False, 'send_time': ret['send_time'], }) if ret['reset_flag']: @@ -119,7 +122,7 @@ class Sf_Mrs_Connect(http.Controller, MultiInheritController): 'programming_method': ret['programme_way'], 'current_programming_count': ret['reprogramming_num'], 'target_production_id': ret['production_order_no'], - 'apply_time': '', + 'apply_time': False, 'send_time': ret['send_time'], })