#9 feat(Tryton): get products salables from tryton only.
This commit is contained in:
parent
d1e137d387
commit
59fbc8872a
@ -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
|
||||
|
@ -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]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user