[FIX] product_usability: fix crash when searching on main supplier

This commit is contained in:
Alexis de Lattre
2025-02-17 19:39:43 +01:00
parent 8510656382
commit e6d801a43a

View File

@@ -40,7 +40,7 @@ class ProductTemplate(models.Model):
# searching on the first line of a o2m is not that easy
# So we search all potential matching products
# Then we filter on the seller_id
records = self.search([("seller_ids.partner_id", operator, value)])
records = self.search([("seller_ids.name", operator, value)])
records = records.filtered_domain([("seller_id", operator, value)])
return [("id", "in", records.ids)]