From 2a20d54530dd36a2fc488f90efa65c7c6d343627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E5=B0=A7?= Date: Fri, 20 Dec 2024 13:02:10 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=B7=A5=E5=BA=8F=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=8E=92=E9=99=A4=E5=B7=B2=E7=BB=8F=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E7=9A=84=E5=B7=A5=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../models/mrp_routing_workcenter.py | 4 ++-- sf_manufacturing/views/model_type_view.xml | 20 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sf_manufacturing/models/mrp_routing_workcenter.py b/sf_manufacturing/models/mrp_routing_workcenter.py index e09b0aa5..27c8e9d2 100644 --- a/sf_manufacturing/models/mrp_routing_workcenter.py +++ b/sf_manufacturing/models/mrp_routing_workcenter.py @@ -94,9 +94,9 @@ class ResMrpRoutingWorkcenter(models.Model): route_ids.append(t.route_id.surface_technics_id.id) domain = [('id', 'not in', route_ids), ('routing_tag', '=', 'special')] return self._search(domain, limit=limit, access_rights_uid=name_get_uid) - if self._context.get('is_duplicate') and self._context.get('model_type'): + if self._context.get('is_duplicate') and self._context.get('model_name'): # 查询出已经选择的工序 - model_type = self.env[self._context.get('model_type')].search_read([],['route_workcenter_id']) + model_type = self.env[self._context.get('model_name')].search_read([],['route_workcenter_id']) route_workcenter_ids = [item['route_workcenter_id'][0] if item['route_workcenter_id'] else False for item in model_type] domain = args + [('id', 'not in', route_workcenter_ids)] return self._search(domain, limit=limit, access_rights_uid=name_get_uid) diff --git a/sf_manufacturing/views/model_type_view.xml b/sf_manufacturing/views/model_type_view.xml index d3f90fd7..f4c1f994 100644 --- a/sf_manufacturing/views/model_type_view.xml +++ b/sf_manufacturing/views/model_type_view.xml @@ -3,7 +3,7 @@ #------------------模型类型------------------ - + search.sf.model.type sf.model.type @@ -14,7 +14,7 @@ - + tree.sf.model.type sf.model.type @@ -24,7 +24,7 @@ - + form.sf.model.type sf.model.type @@ -37,7 +37,7 @@ - + @@ -48,7 +48,7 @@ - + @@ -59,7 +59,7 @@ - + @@ -70,7 +70,7 @@ - + @@ -81,7 +81,7 @@ - + 模型类型 ir.actions.act_window sf.model.type @@ -96,11 +96,11 @@ \ No newline at end of file