Accept Merge Request #1867: (feature/tool_standard_library_process -> develop)

Merge Request: 切割工单过滤掉回退按钮

Created By: @廖丹龙
Reviewed By: @胡尧
Approved By: @胡尧 
Accepted By: @廖丹龙
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1867
This commit is contained in:
廖丹龙
2025-02-26 14:38:34 +08:00
committed by Coding
2 changed files with 3 additions and 5 deletions

View File

@@ -90,7 +90,7 @@ class ResMrpWorkOrder(models.Model):
('state', '!=', 'cancel')
])
finish_move = next((move for move in moves if move.location_dest_id.name == '制造后'), None)
if not finish_move and not cur_workorder.is_subcontract and not cur_workorder.name == '解除装夹':
if not finish_move and not cur_workorder.is_subcontract and not cur_workorder.routing_type == '解除装夹':
record.back_button_display = True
else:
record.back_button_display = any(
@@ -104,7 +104,7 @@ class ResMrpWorkOrder(models.Model):
else:
record.back_button_display = False
# tag_type
if cur_workorder.is_subcontract or cur_workorder.name == '解除装夹' or any(
if cur_workorder.is_subcontract or cur_workorder.routing_type == '解除装夹' or cur_workorder.routing_type == '切割' or any(
detection_result.processing_panel == cur_workorder.processing_panel and
detection_result.routing_type == cur_workorder.routing_type and
cur_workorder.tag_type !='重新加工' and
@@ -120,7 +120,7 @@ class ResMrpWorkOrder(models.Model):
record.back_button_display = True
else:
record.back_button_display = False
if cur_workorder.is_subcontract or cur_workorder.name == '解除装夹' or any(
if cur_workorder.is_subcontract or cur_workorder.routing_type == '解除装夹' or cur_workorder.routing_type == '切割' or any(
detection_result.processing_panel == cur_workorder.processing_panel and
detection_result.routing_type == cur_workorder.routing_type and
cur_workorder.tag_type !='重新加工' and

View File

@@ -2305,8 +2305,6 @@ class Cutting_tool_standard_library(models.Model):
result = json.loads(r['result'])
if result['status'] == 1:
for item in result['cutting_tool_standard_library_all_list']:
if item['code'] == 'JKM-T-DJWL-ZTDJ-20250225001':
print('qwfhuiuiohfqwuio')
cutting_tool_standard_library = self.search(
[("code", '=', item['code']),
("active", 'in', [True, False])])