#9 feat(Tryton): get products salables from tryton only.

This commit is contained in:
Mono Mono 2025-07-27 23:34:07 -05:00
parent d1e137d387
commit 59fbc8872a
2 changed files with 2 additions and 2 deletions

View File

@ -262,7 +262,7 @@ class ProductsFromTrytonView(APIView):
tryton_client.connect()
method = 'model.product.product.search'
context = {'company': 1}
params = [[], 0, 1000, [["rec_name", "ASC"], ["id", None]], context]
params = [[["salable", "=", True]], 0, 1000, [["rec_name", "ASC"], ["id", None]], context]
product_ids = tryton_client.call(method, params)
tryton_products = self.__get_product_datails_from_tryton(
product_ids, tryton_client, context

View File

@ -33,7 +33,7 @@ class TestProductsFromTryton(TestCase):
def fake_call(*args, **kwargs):
product_search = 'model.product.product.search'
search_args = [[], 0, 1000, [['rec_name', 'ASC'], ['id', None]], {'company': 1}]
search_args = [[["salable", "=", True]], 0, 1000, [['rec_name', 'ASC'], ['id', None]], {'company': 1}]
if (args == (product_search, search_args)):
return [190, 191, 192]