Accept Merge Request #2129: (feature/6694 -> develop)

Merge Request: 解决采购申请中零件图号不匹配的问题

Created By: @胡尧
Accepted By: @胡尧
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/2129?initial=true
This commit is contained in:
胡尧
2025-05-15 16:30:28 +08:00
committed by Coding

View File

@@ -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)