Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/制造功能优化
This commit is contained in:
@@ -103,7 +103,11 @@ class ResMrpWorkOrder(models.Model):
|
||||
record.back_button_display = True
|
||||
else:
|
||||
record.back_button_display = False
|
||||
if cur_workorder.is_subcontract or cur_workorder.name == '解除装夹':
|
||||
# tag_type
|
||||
if cur_workorder.is_subcontract or cur_workorder.name == '解除装夹' or any(
|
||||
detection_result.processing_panel == cur_workorder.processing_panel and detection_result.routing_type == cur_workorder.routing_type and cur_workorder.tag_type !='重新加工'
|
||||
for detection_result in cur_workorder.production_id.detection_result_ids
|
||||
):
|
||||
record.back_button_display = False
|
||||
else:
|
||||
next_workorder = sorted_workorders[position + 1]
|
||||
@@ -113,7 +117,10 @@ class ResMrpWorkOrder(models.Model):
|
||||
record.back_button_display = True
|
||||
else:
|
||||
record.back_button_display = False
|
||||
if cur_workorder.is_subcontract or cur_workorder.name == '解除装夹':
|
||||
if cur_workorder.is_subcontract or cur_workorder.name == '解除装夹' or any(
|
||||
detection_result.processing_panel == cur_workorder.processing_panel and detection_result.routing_type == cur_workorder.routing_type and cur_workorder.tag_type !='重新加工'
|
||||
for detection_result in cur_workorder.production_id.detection_result_ids
|
||||
):
|
||||
record.back_button_display = False
|
||||
|
||||
date_planned_start = fields.Datetime(tracking=True)
|
||||
@@ -1513,7 +1520,8 @@ class ResMrpWorkOrder(models.Model):
|
||||
# ('state', '!=', 'done')])
|
||||
# if raw_move:
|
||||
# raw_move.write({'state': 'done'})
|
||||
record.production_id.button_mark_done1()
|
||||
if record.production_id.state != 'rework':
|
||||
record.production_id.button_mark_done1()
|
||||
# record.production_id.state = 'done'
|
||||
|
||||
# ============工单完成,修改对应[质检单]的值=====================
|
||||
|
||||
Reference in New Issue
Block a user