From f0733737bf1f48431da411e3c093f60a2ed75cd7 Mon Sep 17 00:00:00 2001 From: IT Fixcomart Date: Mon, 21 Nov 2022 10:51:58 +0700 Subject: product with detail solr --- indoteknik_api/controllers/api_v1/product.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indoteknik_api/controllers/api_v1') 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) -- cgit v1.2.3