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