From b604209df4e5ba1b1346f1bb26c3b948c62727fe Mon Sep 17 00:00:00 2001 From: liaodanlong Date: Tue, 21 Jan 2025 16:23:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=80=E5=85=B7=E6=A0=87=E5=87=86=E5=BA=93?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E8=A7=86=E5=9B=BE=E6=B7=BB=E5=8A=A0=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E6=97=B6=E9=97=B4=E4=B8=8E=E4=BF=AE=E6=94=B9=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_base/views/tool_views.xml | 2 ++ sf_mrs_connect/models/sync_common.py | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sf_base/views/tool_views.xml b/sf_base/views/tool_views.xml index b2d53392..82365a9e 100644 --- a/sf_base/views/tool_views.xml +++ b/sf_base/views/tool_views.xml @@ -112,6 +112,8 @@ + + diff --git a/sf_mrs_connect/models/sync_common.py b/sf_mrs_connect/models/sync_common.py index ddd7c3c4..d4aa3f36 100644 --- a/sf_mrs_connect/models/sync_common.py +++ b/sf_mrs_connect/models/sync_common.py @@ -2335,9 +2335,9 @@ class Cutting_tool_standard_library(models.Model): 'maintenance.equipment.image'].search( [('name', '=', item['fit_blade_shape'])]).id, "chuck_id": False if not item['chuck_code'] else self.search( - [('code', '=', item['chuck_code'].replace("JKM", result['factory_short_name']))]).id, + [('code', '=', item['chuck_code'])]).id, "handle_id": False if not item['handle_code'] else self.search( - [('code', '=', item['handle_code'].replace("JKM", result['factory_short_name']))]).id, + [('code', '=', item['handle_code'])]).id, "suitable_machining_method_ids": [(6, 0, [])] if not item.get( 'suitable_machining_method') else self.env['maintenance.equipment.image']._get_ids( item['suitable_machining_method']), @@ -2377,9 +2377,9 @@ class Cutting_tool_standard_library(models.Model): 'maintenance.equipment.image'].search( [('name', '=', item['fit_blade_shape'])]).id, "chuck_id": False if not item['chuck_code'] else self.search( - [('code', '=', item['chuck_code'].replace("JKM", result['factory_short_name']))]).id, + [('code', '=', item['chuck_code'])]).id, "handle_id": False if not item['handle_code'] else self.search( - [('code', '=', item['handle_code'].replace("JKM", result['factory_short_name']))]).id, + [('code', '=', item['handle_code'])]).id, "suitable_machining_method_ids": [(6, 0, [])] if not item.get( 'suitable_machining_methods') else self.env['maintenance.equipment.image']._get_ids( item['suitable_machining_methods']),