1、制造订单返工按钮添加新的显示条件;2、优化返工流程

This commit is contained in:
yuxianghui
2025-01-15 14:36:49 +08:00
parent 1b9dbffcce
commit 5297bf05d1
3 changed files with 12 additions and 5 deletions

View File

@@ -138,7 +138,10 @@ class ReworkWizard(models.TransientModel):
lambda item: (item.route_id.name in work.name and item.process_parameters_id
and item.process_parameters_id == work.surface_technics_parameters_id) or
(item.route_id.name == work.name and item.panel
and item.panel == work.processing_panel))
and item.panel == work.processing_panel) or
(item.route_id == work.routing_workcenter_id
and not work.processing_panel
and not work.surface_technics_parameters_id))
if route:
work_list = self.env['mrp.workorder'].json_workorder_str(self.production_id, route[0])
work_list[2].update({'tag_type': '重新加工', 'sequence': 0})
@@ -304,6 +307,8 @@ class ReworkWizard(models.TransientModel):
if self.env.user.has_group('sf_base.group_sf_order_user'):
panel_ids = []
panel_arr = production_id.product_id.model_processing_panel
if panel_arr is False:
break
for p in production_id.detection_result_ids.filtered(
lambda ap1: ap1.handle_result == '待处理'):
if p.processing_panel not in panel_arr: