Skip to content

Commit

Permalink
[IMP] product_supplierinfo_for_customer: change _name_search product …
Browse files Browse the repository at this point in the history
…restrictions

Checking whether the search has a limit is restricting cases where it is important to retrieve the product by the customer's code. With this change, the restriction on res_ids_len being greater than the limit will only apply if the limit exists.
  • Loading branch information
ThiagoMForgeFlow committed Dec 19, 2024
1 parent d4582ae commit 46de10d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions product_supplierinfo_for_customer/models/product_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ def _name_search(self, name, domain=None, operator="ilike", limit=None, order=No
limit = (limit - res_ids_len) if limit else False
if (
not name
and limit
or not self._context.get("partner_id")
or res_ids_len >= limit
or (limit and res_ids_len >= limit)
):
return res_ids
limit -= res_ids_len
Expand Down

0 comments on commit 46de10d

Please sign in to comment.