From ac4883db666d9a70fd255111478d027a02b477a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E5=B0=A7?= Date: Thu, 15 May 2025 16:29:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=87=87=E8=B4=AD=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E4=B8=AD=E9=9B=B6=E4=BB=B6=E5=9B=BE=E5=8F=B7=E4=B8=8D?= =?UTF-8?q?=E5=8C=B9=E9=85=8D=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jikimo_purchase_request/models/purchase_request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jikimo_purchase_request/models/purchase_request.py b/jikimo_purchase_request/models/purchase_request.py index 9ed11f13..3db8a2d1 100644 --- a/jikimo_purchase_request/models/purchase_request.py +++ b/jikimo_purchase_request/models/purchase_request.py @@ -92,7 +92,7 @@ class PurchaseRequestLine(models.Model): continue if record.product_id.categ_id.name == '坯料': product_name = '' - match = re.search(r'(S\d{5}-\d)', record.product_id.name) + match = re.search(r'(S\d{5}-\d*)', record.product_id.name) # 如果匹配成功,提取结果 if match: product_name = match.group(0)