diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2022-11-21 10:51:58 +0700 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2022-11-21 10:51:58 +0700 |
| commit | f0733737bf1f48431da411e3c093f60a2ed75cd7 (patch) | |
| tree | 405ea9ab0ada9d4aee2403a6b09e20f78194c402 /indoteknik_api/controllers/api_v1 | |
| parent | b7d183eabc6f3dbf1750191a852c23eb5cb9c5b8 (diff) | |
product with detail solr
Diffstat (limited to 'indoteknik_api/controllers/api_v1')
| -rw-r--r-- | indoteknik_api/controllers/api_v1/product.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_api/controllers/api_v1/product.py b/indoteknik_api/controllers/api_v1/product.py index 09ea459d..2e978679 100644 --- a/indoteknik_api/controllers/api_v1/product.py +++ b/indoteknik_api/controllers/api_v1/product.py @@ -101,7 +101,7 @@ class Product(controller.Controller): product_templates = request.env['product.template'].search(query, limit=limit, offset=offset) data = { 'product_total': request.env['product.template'].search_count(query), - 'products': [request.env['product.template'].api_single_response(x, with_detail=True) for x in product_templates] + 'products': [request.env['product.template'].api_single_response(x, with_detail='SOLR') for x in product_templates] } return self.response(data) @@ -118,7 +118,7 @@ class Product(controller.Controller): id = [int(x) for x in id.split(',')] product_templates = request.env['product.template'].search([('id', 'in', id)]) if product_templates: - data = [request.env['product.template'].api_single_response(x, with_detail=True) for x in product_templates] + data = [request.env['product.template'].api_single_response(x, with_detail='DEFAULT') for x in product_templates] return self.response(data) |
