解决修改产品名称带来的影响

This commit is contained in:
胡尧
2025-06-16 09:33:52 +08:00
parent 347019d7ee
commit 1811dbf0fd
5 changed files with 12 additions and 0 deletions

View File

@@ -150,6 +150,8 @@ class PurchaseRequestLine(models.Model):
# 如果匹配成功,提取结果
if match:
product_name = match.group(0)
else:
product_name = record.product_id.name
sale_order_name = ''
match_sale = re.search(r'S(\d+)', record.product_id.name)
if match_sale: