diff --git a/sf_machine_connect/views/SfWorkOrderBarcodes.xml b/sf_machine_connect/views/SfWorkOrderBarcodes.xml index d1ba5126..57c216cf 100644 --- a/sf_machine_connect/views/SfWorkOrderBarcodes.xml +++ b/sf_machine_connect/views/SfWorkOrderBarcodes.xml @@ -13,7 +13,7 @@ - + diff --git a/sf_manufacturing/models/mrp_production.py b/sf_manufacturing/models/mrp_production.py index dd474527..6c68084e 100644 --- a/sf_manufacturing/models/mrp_production.py +++ b/sf_manufacturing/models/mrp_production.py @@ -196,7 +196,7 @@ class MrpProduction(models.Model): ) i += 1 for route in product_routing_workcenter: - if i == 1 and route.routing_type == '获取CNC加工程序': + if i == 1 and route.routing_type == '装夹预制': workorders_values.append( self.env['mrp.workorder'].json_workorder_str('', production, route)) if route.is_repeat is True: @@ -416,10 +416,10 @@ class MrpProduction(models.Model): for work in rec.workorder_ids: work.sequence = current_sequence current_sequence += 1 - if work.name == '获取CNC加工程序': - work.button_start() - #work.fetchCNC() - work.button_finish() + # if work.name == '获取CNC加工程序': + # work.button_start() + # #work.fetchCNC() + # work.button_finish() # 创建工单并进行排序 def _create_workorder(self): diff --git a/sf_manufacturing/models/mrp_routing_workcenter.py b/sf_manufacturing/models/mrp_routing_workcenter.py index 807dfbb5..c8e7d8aa 100644 --- a/sf_manufacturing/models/mrp_routing_workcenter.py +++ b/sf_manufacturing/models/mrp_routing_workcenter.py @@ -6,9 +6,9 @@ class ResMrpRoutingWorkcenter(models.Model): _inherit = 'mrp.routing.workcenter' routing_type = fields.Selection([ - ('获取CNC加工程序', '获取CNC加工程序'), - ('装夹', '装夹'), - ('前置三元定位检测', '前置三元定位检测'), + # ('获取CNC加工程序', '获取CNC加工程序'), + ('装夹预调', '装夹预调'), + # ('前置三元定位检测', '前置三元定位检测'), ('CNC加工', 'CNC加工'), ('后置三元质量检测', '后置三元质量检测'), ('解除装夹', '解除装夹'), diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py index 7ecec223..2097eabe 100644 --- a/sf_manufacturing/models/mrp_workorder.py +++ b/sf_manufacturing/models/mrp_workorder.py @@ -31,9 +31,9 @@ class ResMrpWorkOrder(models.Model): processing_panel = fields.Char('加工面') sequence = fields.Integer(string='工序') routing_type = fields.Selection([ - ('获取CNC加工程序', '获取CNC加工程序'), - ('装夹', '装夹'), - ('前置三元定位检测', '前置三元定位检测'), + # ('获取CNC加工程序', '获取CNC加工程序'), + ('装夹预调', '装夹预调'), + # ('前置三元定位检测', '前置三元定位检测'), ('CNC加工', 'CNC加工'), ('后置三元质量检测', '后置三元质量检测'), ('解除装夹', '解除装夹'), @@ -204,15 +204,15 @@ class ResMrpWorkOrder(models.Model): if route.routing_type == '切割': duration_expected = self.env['mrp.routing.workcenter'].sudo().search( [('name', '=', '切割')]).time_cycle - elif route.routing_type == '获取CNC加工程序': + # elif route.routing_type == '获取CNC加工程序': + # duration_expected = self.env['mrp.routing.workcenter'].sudo().search( + # [('name', '=', '获取CNC加工程序')]).time_cycle + elif route.routing_type == '装夹预制': duration_expected = self.env['mrp.routing.workcenter'].sudo().search( - [('name', '=', '获取CNC加工程序')]).time_cycle - elif route.routing_type == '工件装夹': - duration_expected = self.env['mrp.routing.workcenter'].sudo().search( - [('name', '=', '工件装夹')]).time_cycle - elif route.routing_type == '前置三元定位检测': - duration_expected = self.env['mrp.routing.workcenter'].sudo().search( - [('name', '=', '前置三元定位检测')]).time_cycle + [('name', '=', '装夹预制')]).time_cycle + # elif route.routing_type == '前置三元定位检测': + # duration_expected = self.env['mrp.routing.workcenter'].sudo().search( + # [('name', '=', '前置三元定位检测')]).time_cycle elif route.routing_type == 'CNC加工': duration_expected = self.env['mrp.routing.workcenter'].sudo().search( [('name', '=', 'CNC加工')]).time_cycle @@ -495,7 +495,7 @@ class ResMrpWorkOrder(models.Model): # 重写工单开始按钮方法 def button_start(self): - if self.routing_type == '装夹' and self.production_id.move_raw_ids[0].move_line_ids[0].lot_id.name: + if self.routing_type == '装夹预制' and self.production_id.move_raw_ids[0].move_line_ids[0].lot_id.name: self.pro_code = self.production_id.move_raw_ids[0].move_line_ids[0].lot_id.name # 外协出库单,从“正在等待”变为“就绪”状态 if self.is_subcontract is True: diff --git a/sf_manufacturing/views/mrp_workorder_view.xml b/sf_manufacturing/views/mrp_workorder_view.xml index 53373c51..9bd5ef94 100644 --- a/sf_manufacturing/views/mrp_workorder_view.xml +++ b/sf_manufacturing/views/mrp_workorder_view.xml @@ -162,11 +162,11 @@ + attrs='{"invisible": [("routing_type","!=","装夹预制")]}'/> + attrs='{"invisible": [("routing_type","!=","装夹预制")]}'/> + attrs='{"invisible": [("routing_type","!=","装夹预制")]}'/>
@@ -219,7 +219,7 @@ - + @@ -241,10 +241,7 @@ placeholder="如有预调程序信息请在此处输入....."/> - - - - +
左面:
@@ -397,8 +394,10 @@ + +