diff --git a/sf_manufacturing/models/purchase_order.py b/sf_manufacturing/models/purchase_order.py index b7ec1bc2..a16eb120 100644 --- a/sf_manufacturing/models/purchase_order.py +++ b/sf_manufacturing/models/purchase_order.py @@ -124,7 +124,7 @@ class PurchaseOrderLine(models.Model): if match: product_name = match.group(0) sale_order_name = '' - match_sale = re.search(r'(\d+)', record.product_id.name) + match_sale = re.search(r'S(\d+)', record.product_id.name) if match_sale: sale_order_name = match_sale.group(0) sale_order = self.env['sale.order'].sudo().search(