From 3c569fd4851789a407797d8e1321d13bbb417f8b Mon Sep 17 00:00:00 2001 From: yuxianghui <3437689193@qq.com> Date: Thu, 29 Feb 2024 14:48:21 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=88=80=E5=85=B7=E7=BB=84=E5=92=8C?= =?UTF-8?q?=E5=88=80=E5=85=B7=E7=AE=A1=E7=90=86=E6=A8=A1=E5=9D=97=E4=B8=8B?= =?UTF-8?q?=E7=9A=84=E6=89=80=E4=BB=A5=E6=A8=A1=E5=9E=8B=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?active=E5=AD=97=E6=AE=B5=EF=BC=8C=E6=B7=BB=E5=8A=A0=E5=B7=B2?= =?UTF-8?q?=E5=BD=92=E6=A1=A3=E6=90=9C=E7=B4=A2=E6=96=B9=E5=BC=8F=EF=BC=9B?= =?UTF-8?q?2=E3=80=81=E8=A7=A3=E5=86=B3=E4=BF=A9=E4=B8=AA=E8=AD=A6?= =?UTF-8?q?=E5=91=8A=EF=BC=9B3=E3=80=81=E4=BA=A7=E5=93=81=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E7=9A=84=E5=88=80=E5=85=B7=E7=89=A9=E6=96=99=E3=80=81?= =?UTF-8?q?=E5=9E=8B=E5=8F=B7=E3=80=81=E8=A7=84=E6=A0=BC=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BD=93=E4=BA=A7=E5=93=81=E7=89=A9=E6=96=99?= =?UTF-8?q?=E4=B8=BA=E5=88=80=E5=85=B7=E6=97=B6=E5=BF=85=E5=A1=AB=E5=8F=8A?= =?UTF-8?q?=E7=BA=A2=E6=98=9F=E6=A0=B7=E5=BC=8F=EF=BC=9B4=E3=80=81?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E5=88=80=E5=85=B7=E7=89=A9=E6=96=99=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=A8=A1=E5=9E=8B=E5=92=8CCAM=E7=94=A8=E5=88=80?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E7=9A=84=E5=88=9B=E5=BB=BA=E6=8C=89=E9=92=AE?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_base/models/tool_base_new.py | 6 ++++-- sf_base/views/tool_views.xml | 14 +++++++++++++- .../views/product_template_management_view.xml | 12 ++++++------ sf_tool_management/models/base.py | 12 ++++++++++++ sf_tool_management/models/tool_material_search.py | 2 ++ sf_tool_management/views/tool_base_views.xml | 11 +++++++++-- sf_tool_management/views/tool_material_search.xml | 5 +++-- 7 files changed, 49 insertions(+), 13 deletions(-) diff --git a/sf_base/models/tool_base_new.py b/sf_base/models/tool_base_new.py index 97c4b47a..03a3678b 100644 --- a/sf_base/models/tool_base_new.py +++ b/sf_base/models/tool_base_new.py @@ -189,9 +189,9 @@ class MaintenanceStandardImage(models.Model): ('压紧方式', '压紧方式'), ('刀片形状', '刀片形状'), ('冷却方式', '冷却方式')], string='特征') equipment_id = fields.Many2many('maintenance.equipment', 'image_id', string='设备') - equipment_lq_id = fields.Many2many('maintenance.equipment', 'image_lq_id', string='设备') + equipment_lq_id = fields.Many2many('maintenance.equipment', 'image_lq_id', string='设备能力特征') jg_equipment_id = fields.Many2many('sf.machine_tool.type', 'jg_image_id', string='机床型号') - lq_equipment_id = fields.Many2many('sf.machine_tool.type', 'lq_image_id', string='机床型号') + lq_equipment_id = fields.Many2many('sf.machine_tool.type', 'lq_image_id', string='机床型号能力特征') def _get_ids(self, name_arr): ability_feature_ids = [] @@ -254,6 +254,8 @@ class ToolGroups(models.Model): equipment_ids = fields.Many2many('maintenance.equipment', 'ref_maintenance_equipment', string='机台号') remark = fields.Char('备注', size=50) + active = fields.Boolean(string='已归档', default=True) + # ==========机床刀具组接口========== # def _register_tool_groups(self, obj): # # create_url = '/AutoDeviceApi/MachineToolGroup' diff --git a/sf_base/views/tool_views.xml b/sf_base/views/tool_views.xml index 5763b3a0..d1c0c510 100644 --- a/sf_base/views/tool_views.xml +++ b/sf_base/views/tool_views.xml @@ -505,11 +505,23 @@ + + 刀具组搜索 + sf.tool.groups + + + + + + + + + 刀具组 ir.actions.act_window sf.tool.groups - tree + tree,search diff --git a/sf_dlm_management/views/product_template_management_view.xml b/sf_dlm_management/views/product_template_management_view.xml index b1d0f50f..7ba273bc 100644 --- a/sf_dlm_management/views/product_template_management_view.xml +++ b/sf_dlm_management/views/product_template_management_view.xml @@ -27,14 +27,14 @@ - - - diff --git a/sf_tool_management/models/base.py b/sf_tool_management/models/base.py index 8fad0b08..22cb1b42 100644 --- a/sf_tool_management/models/base.py +++ b/sf_tool_management/models/base.py @@ -42,6 +42,8 @@ class FunctionalCuttingToolEntity(models.Model): current_location = fields.Char('位置', compute='_compute_current_location_id') image = fields.Binary('图片', readonly=True) + active = fields.Boolean(string='已归档', default=True) + @api.depends('barcode_id') def _compute_current_location_id(self): for record in self: @@ -241,6 +243,8 @@ class FunctionalToolWarning(models.Model): dispose_time = fields.Char('处理时间') dispose_func = fields.Char('处理方法/措施', readonly=False) + active = fields.Boolean(string='已归档', default=True) + @api.model def _read_group_machine_table_name_ids(self, categories, domain, order): machine_table_name_ids = categories._search([], order=order, access_rights_uid=SUPERUSER_ID) @@ -340,6 +344,8 @@ class RealTimeDistributionOfFunctionalTools(models.Model): sf_functional_tool_assembly_ids = fields.Many2many('sf.functional.tool.assembly', 'sf_functional_tool_assembly_ref', '功能刀具组装单', readonly=True) + active = fields.Boolean(string='已归档', default=True) + @api.depends('tool_groups_id', 'diameter', 'knife_tip_r_angle') def _compute_name(self): for obj in self: @@ -511,6 +517,8 @@ class MachineTableToolChangingApply(models.Model): sf_functional_tool_assembly_id = fields.Many2one('sf.functional.tool.assembly', '功能刀具组装单', readonly=True) + active = fields.Boolean(string='已归档', default=True) + @api.depends('alarm_value', 'used_value') def _compute_functional_tool_status(self): for record in self: @@ -677,6 +685,8 @@ class CAMWorkOrderProgramKnifePlan(models.Model): sf_functional_tool_assembly_id = fields.Many2one('sf.functional.tool.assembly', '功能刀具组装', readonly=True) + active = fields.Boolean(string='已归档', default=True) + @api.depends('diameter', 'tool_included_angle', 'tool_groups_id') def _compute_functional_tool_name(self): for obj in self: @@ -928,6 +938,8 @@ class FunctionalToolAssembly(models.Model): sf_cam_work_order_program_knife_plan_id = fields.Many2one('sf.cam.work.order.program.knife.plan', 'CAM工单程序用刀计划', readonly=True, ) + active = fields.Boolean(string='已归档', default=True) + def _get_code(self, loading_task_source): """ 自动生成组装单编码 diff --git a/sf_tool_management/models/tool_material_search.py b/sf_tool_management/models/tool_material_search.py index f412f119..d62a4b5f 100644 --- a/sf_tool_management/models/tool_material_search.py +++ b/sf_tool_management/models/tool_material_search.py @@ -328,6 +328,8 @@ class ToolMaterial(models.Model): barcode_ids = fields.One2many('stock.lot', 'tool_material_search_id', string='序列号', readonly=True) + active = fields.Boolean(string='已归档', default=True) + @api.depends('barcode_ids') def _compute_number(self): for record in self: diff --git a/sf_tool_management/views/tool_base_views.xml b/sf_tool_management/views/tool_base_views.xml index bac6533d..239845a4 100644 --- a/sf_tool_management/views/tool_base_views.xml +++ b/sf_tool_management/views/tool_base_views.xml @@ -200,6 +200,7 @@ + @@ -269,6 +270,7 @@ + @@ -417,6 +419,7 @@ + @@ -749,6 +752,7 @@ + @@ -772,7 +776,7 @@ CAM工单程序用刀计划 sf.cam.work.order.program.knife.plan - + @@ -806,7 +810,7 @@ CAM工单程序用刀计划 sf.cam.work.order.program.knife.plan -
+