From 1a896a730e426f29b4fdc526b56bcaf55ca985bc Mon Sep 17 00:00:00 2001 From: "qihao.gong@jikimo.com" Date: Tue, 9 Jan 2024 14:17:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=89=E5=8F=96=E6=9C=80=E6=96=B0=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_machine_connect/views/SfWorkOrderBarcodes.xml | 2 +- sf_manufacturing/models/mrp_production.py | 2 +- sf_manufacturing/models/mrp_workorder.py | 6 +++--- sf_manufacturing/models/product_template.py | 4 ++-- sf_manufacturing/views/mrp_workorder_view.xml | 10 +++++----- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sf_machine_connect/views/SfWorkOrderBarcodes.xml b/sf_machine_connect/views/SfWorkOrderBarcodes.xml index 57c216cf..5a24a0b7 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 3855222d..36a37b0c 100644 --- a/sf_manufacturing/models/mrp_production.py +++ b/sf_manufacturing/models/mrp_production.py @@ -258,7 +258,7 @@ class MrpProduction(models.Model): ) i += 1 for route in product_routing_workcenter: - if i == 1 and route.routing_type == '装夹预制': + 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: diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py index 2097eabe..7b54ebde 100644 --- a/sf_manufacturing/models/mrp_workorder.py +++ b/sf_manufacturing/models/mrp_workorder.py @@ -207,9 +207,9 @@ class ResMrpWorkOrder(models.Model): # elif route.routing_type == '获取CNC加工程序': # duration_expected = self.env['mrp.routing.workcenter'].sudo().search( # [('name', '=', '获取CNC加工程序')]).time_cycle - elif route.routing_type == '装夹预制': + 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 @@ -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/models/product_template.py b/sf_manufacturing/models/product_template.py index 1361a821..759413d2 100644 --- a/sf_manufacturing/models/product_template.py +++ b/sf_manufacturing/models/product_template.py @@ -833,9 +833,9 @@ class ResProductFixture(models.Model): fixture_model_id = fields.Many2one('sf.fixture.model', '夹具型号') specification_fixture_id = fields.Many2one('sf.fixture.materials.basic.parameters', '夹具规格') - fixture_material_id = fields.Many2one('sf.fixture.material', string="夹具物料", required=True) + fixture_material_id = fields.Many2one('sf.fixture.material', string="夹具物料") fixture_material_type = fields.Char(string="夹具物料类型", related='fixture_material_id.name') - multi_mounting_type_id = fields.Many2one('sf.multi_mounting.type', string="联装类型", required=True) + multi_mounting_type_id = fields.Many2one('sf.multi_mounting.type', string="联装类型") model_file = fields.Binary(string="3D模型图") # 夹具物料基本参数 diff --git a/sf_manufacturing/views/mrp_workorder_view.xml b/sf_manufacturing/views/mrp_workorder_view.xml index 9bd5ef94..8a9214e9 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,7 +241,7 @@ placeholder="如有预调程序信息请在此处输入....."/> - +
左面: