Skip to content

Commit a731c7a

Browse files
author
German Loredo [Vauxoo]
committed
[FIX] product_supplierinfo_for_customer: fix missing products in comodel search
When searching for products in a comodel, the results are obtained via the `_name_search` method over `product.product`. Currently, this search is not retrieving all matching results. This issue occurs because the parameters for the `_name_search` method changed in Odoo v17, and during the migration, this was not adapted. As a result, when the method is called, it only retrieves 100 results due to the default limit not being handled correctly. This commit updates the overridden `_name_search` method to match the new method signature in Odoo v17 and properly handle the `limit` parameter. This ensures that all matching products are returned during
1 parent f1f15b1 commit a731c7a

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

product_supplierinfo_for_customer/__manifest__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@
1919
],
2020
"demo": ["demo/product_demo.xml"],
2121
"installable": True,
22+
"maintainers": ["luisg123v"],
2223
}

product_supplierinfo_for_customer/models/product_product.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ def _compute_display_name(self):
1616
)._compute_display_name()
1717

1818
@api.model
19-
def _name_search(
20-
self, name="", domain=None, operator="ilike", limit=100, order=None
21-
):
19+
def _name_search(self, name, domain=None, operator="ilike", limit=None, order=None):
2220
res = super()._name_search(
2321
name, domain=domain, operator=operator, limit=limit, order=order
2422
)

0 commit comments

Comments
 (0)