diff --git a/addons/product/models/product_template.py b/addons/product/models/product_template.py index ef0f698424b..43d34f65c8c 100644 --- a/addons/product/models/product_template.py +++ b/addons/product/models/product_template.py @@ -322,7 +322,7 @@ class ProductTemplate(models.Model): products_ns = Product.name_search(name, args+domain, operator=operator) products = Product.browse([x[0] for x in products_ns]) templates |= products.mapped('product_tmpl_id') - if (not products) or (len(templates) > limit): + if (not products) or (limit and (len(templates) > limit)): break # re-apply product.template order + name_get