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

This commit is contained in:
胡尧
2025-05-15 16:29:33 +08:00
parent f780e4f7ce
commit ac4883db66

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)