diff --git a/sf_manufacturing/controllers/controllers.py b/sf_manufacturing/controllers/controllers.py index 2a5e4d3e..64a981ad 100644 --- a/sf_manufacturing/controllers/controllers.py +++ b/sf_manufacturing/controllers/controllers.py @@ -596,6 +596,9 @@ class Manufacturing_Connect(http.Controller): if panel_workorder: panel_workorder.write({'production_line_state': '已下产线'}) workorder.write({'state': 'to be detected'}) + workorder.check_ids.filtered( + lambda ch: ch.quality_state == 'waiting').write( + {'quality_state': 'none'}) else: res = {'Succeed': False, 'ErrorCode': 204, 'Error': 'DeviceId为%s没有对应的已配送工件数据' % ret['DeviceId']} diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py index 1980ae1a..f8197783 100644 --- a/sf_manufacturing/models/mrp_workorder.py +++ b/sf_manufacturing/models/mrp_workorder.py @@ -1543,7 +1543,8 @@ class ResMrpWorkOrder(models.Model): # 修改工单状态 self.write({'state': 'to be detected'}) # 若关联的【质量检查_需送检】=true,则质量检查单的状态从“等待”更新为“待处理” - self.check_ids.filtered(lambda ch: ch.is_inspect is True).write({'quality_state': 'none'}) + self.check_ids.filtered(lambda ch: ch.is_inspect is True and ch.quality_state == 'waiting').write( + {'quality_state': 'none'}) class CNCprocessing(models.Model): diff --git a/sf_manufacturing/views/mrp_production_addional_change.xml b/sf_manufacturing/views/mrp_production_addional_change.xml index d71ba4a5..aaeff8c8 100644 --- a/sf_manufacturing/views/mrp_production_addional_change.xml +++ b/sf_manufacturing/views/mrp_production_addional_change.xml @@ -74,7 +74,9 @@ 1 - + + + diff --git a/sf_manufacturing/views/mrp_workorder_view.xml b/sf_manufacturing/views/mrp_workorder_view.xml index 505d0c41..971a39ad 100644 --- a/sf_manufacturing/views/mrp_workorder_view.xml +++ b/sf_manufacturing/views/mrp_workorder_view.xml @@ -182,7 +182,7 @@