From 0b067f999978c816aa2057c5433674d632e9309a Mon Sep 17 00:00:00 2001 From: liaodanlong Date: Wed, 19 Mar 2025 12:59:16 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8E=9F=E6=9D=90=E6=96=99=E7=9A=84?= =?UTF-8?q?=E8=B0=83=E6=8B=A8=E5=8D=95=E7=BC=BA=E5=B0=91=E9=9B=B6=E4=BB=B6?= =?UTF-8?q?=E5=9B=BE=E5=8F=B7=E9=9B=B6=E4=BB=B6=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sf_manufacturing/models/stock.py b/sf_manufacturing/models/stock.py index 02018a11..57fb443f 100644 --- a/sf_manufacturing/models/stock.py +++ b/sf_manufacturing/models/stock.py @@ -754,7 +754,7 @@ class ReStockMove(models.Model): if move.product_id.categ_id.type == '成品': move.part_number = move.product_id.part_number move.part_name = move.product_id.part_name - elif move.product_id.categ_id.type == '坯料': + elif move.product_id.categ_id.type == '坯料' or move.product_id.categ_id.type == '原材料': product_name = '' match = re.search(r'(S\d{5}-\d)', move.product_id.name) # 如果匹配成功,提取结果 From 221e25f581e367df0ea056097b3e55892a1b9617 Mon Sep 17 00:00:00 2001 From: liaodanlong Date: Wed, 19 Mar 2025 15:33:06 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E3=80=90=E5=90=88=E9=87=91=E7=89=8C?= =?UTF-8?q?=E5=8F=B7=E3=80=91=EF=BC=8C=E3=80=90=E6=9D=90=E6=96=99=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E3=80=91=E5=AD=97=E6=AE=B5=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_mrs_connect/models/sync_common.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sf_mrs_connect/models/sync_common.py b/sf_mrs_connect/models/sync_common.py index 57d90342..cd0d8405 100644 --- a/sf_mrs_connect/models/sync_common.py +++ b/sf_mrs_connect/models/sync_common.py @@ -251,6 +251,9 @@ class sfMaterialModel(models.Model): materials_model.density = item['density'] materials_model.active = item['active'] materials_model.materials_code= item['materials_code'] + materials_model.alloy_code = item['alloy_code'] + materials_model.apply = self.env['material.apply'].search( + [("name", 'in', item['apply'])]).ids else: raise ValidationError("材料型号认证未通过")