diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2023-01-18 13:49:11 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2023-01-18 13:49:11 +0700 |
| commit | f5eecb48f361dd0bc45c2d8b4cf12f34aea5f243 (patch) | |
| tree | 3a0eb02fe92b35871137076a391278f96812606d /indoteknik_api/controllers/api_v1 | |
| parent | 65929f7a9c00639a7b1c360ebc9870b221aa5339 (diff) | |
add brand image in category homepage api
Diffstat (limited to 'indoteknik_api/controllers/api_v1')
| -rw-r--r-- | indoteknik_api/controllers/api_v1/category.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/indoteknik_api/controllers/api_v1/category.py b/indoteknik_api/controllers/api_v1/category.py index 36e67e01..62faff85 100644 --- a/indoteknik_api/controllers/api_v1/category.py +++ b/indoteknik_api/controllers/api_v1/category.py @@ -35,7 +35,8 @@ class Category(controller.Controller): 'name': category.category_id.name, 'image': base_url + 'api/image/website.categories.homepage/image/' + str(category.id) if category.image else '', 'url': category.url, - 'brands': [y.x_name for y in brands], + # 'brands': [y.x_name for y in brands], + 'brands': [request.env['x_manufactures'].api_single_response(y) for y in brands], 'products': [request.env['product.template'].api_single_response(x) for x in products] }) return self.response(data) |
