解决库存单据零件图号零件名称不对的问题

This commit is contained in:
胡尧
2025-05-16 09:14:37 +08:00
parent a3c0fd3ccf
commit 4b443e65f6
4 changed files with 5 additions and 5 deletions

View File

@@ -795,7 +795,7 @@ class ResProductMo(models.Model):
for record in self:
if record.categ_id.name == '坯料':
product_name = ''
match = re.search(r'(S\d{5}-\d)', record.name)
match = re.search(r'(S\d{5}-\d+)', record.name)
# 如果匹配成功,提取结果
if match:
product_name = match.group(0)