Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/制造功能优化
This commit is contained in:
@@ -90,7 +90,7 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
('state', '!=', 'cancel')
|
('state', '!=', 'cancel')
|
||||||
])
|
])
|
||||||
finish_move = next((move for move in moves if move.location_dest_id.name == '制造后'), None)
|
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
|
record.back_button_display = True
|
||||||
else:
|
else:
|
||||||
record.back_button_display = any(
|
record.back_button_display = any(
|
||||||
@@ -104,8 +104,11 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
else:
|
else:
|
||||||
record.back_button_display = False
|
record.back_button_display = False
|
||||||
# tag_type
|
# 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 !='重新加工'
|
detection_result.processing_panel == cur_workorder.processing_panel and
|
||||||
|
detection_result.routing_type == cur_workorder.routing_type and
|
||||||
|
cur_workorder.tag_type !='重新加工' and
|
||||||
|
detection_result.test_results != '合格'
|
||||||
for detection_result in cur_workorder.production_id.detection_result_ids
|
for detection_result in cur_workorder.production_id.detection_result_ids
|
||||||
):
|
):
|
||||||
record.back_button_display = False
|
record.back_button_display = False
|
||||||
@@ -117,8 +120,11 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
record.back_button_display = True
|
record.back_button_display = True
|
||||||
else:
|
else:
|
||||||
record.back_button_display = False
|
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 !='重新加工'
|
detection_result.processing_panel == cur_workorder.processing_panel and
|
||||||
|
detection_result.routing_type == cur_workorder.routing_type and
|
||||||
|
cur_workorder.tag_type !='重新加工' and
|
||||||
|
detection_result.test_results != '合格'
|
||||||
for detection_result in cur_workorder.production_id.detection_result_ids
|
for detection_result in cur_workorder.production_id.detection_result_ids
|
||||||
):
|
):
|
||||||
record.back_button_display = False
|
record.back_button_display = False
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ class PurchaseOrderLine(models.Model):
|
|||||||
_inherit = 'purchase.order.line'
|
_inherit = 'purchase.order.line'
|
||||||
|
|
||||||
part_number = fields.Char('零件图号', store=True, compute='_compute_related_product')
|
part_number = fields.Char('零件图号', store=True, compute='_compute_related_product')
|
||||||
part_name = fields.Char('零件图号', store=True,
|
part_name = fields.Char('零件名称', store=True,
|
||||||
compute='_compute_related_product')
|
compute='_compute_related_product')
|
||||||
related_product = fields.Many2one('product.product', string='关联产品',
|
related_product = fields.Many2one('product.product', string='关联产品',
|
||||||
help='经此产品工艺加工成的成品')
|
help='经此产品工艺加工成的成品')
|
||||||
|
|||||||
@@ -2305,8 +2305,6 @@ class Cutting_tool_standard_library(models.Model):
|
|||||||
result = json.loads(r['result'])
|
result = json.loads(r['result'])
|
||||||
if result['status'] == 1:
|
if result['status'] == 1:
|
||||||
for item in result['cutting_tool_standard_library_all_list']:
|
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(
|
cutting_tool_standard_library = self.search(
|
||||||
[("code", '=', item['code']),
|
[("code", '=', item['code']),
|
||||||
("active", 'in', [True, False])])
|
("active", 'in', [True, False])])
|
||||||
|
|||||||
Reference in New Issue
Block a user