修复返工操作时工单状态及制造订单更新程序

This commit is contained in:
jinling.yang
2024-07-15 17:34:18 +08:00
parent 7885794322
commit a0bd214118
5 changed files with 76 additions and 47 deletions

View File

@@ -36,7 +36,7 @@ class ReworkWizard(models.TransientModel):
'detailed_reason': self.detailed_reason,
'processing_panel': self.workorder_id.processing_panel,
'routing_type': self.workorder_id.routing_type,
'handle_result': '待处理' if self.test_results == '返工' else '',
'handle_result': '待处理' if self.workorder_id.test_results == '返工' or self.workorder_id.is_rework is True else '',
'test_results': '返工' if not self.routing_type == 'CNC加工' else self.workorder_id.test_results,
'test_report': self.workorder_id.detection_report})]})
self.workorder_id.button_finish()
@@ -75,7 +75,7 @@ class ReworkWizard(models.TransientModel):
for item in self:
domain = [('id', '=', False)]
production_id = item.production_id
if product_id:
if production_id:
if self.env.user.has_group('sf_base.group_sf_order_user'):
panel_ids = []
for p in production_id.detection_result_ids.filtered(