summaryrefslogtreecommitdiff
path: root/indoteknik_api/controllers/api_v1
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_api/controllers/api_v1')
-rw-r--r--indoteknik_api/controllers/api_v1/product.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/indoteknik_api/controllers/api_v1/product.py b/indoteknik_api/controllers/api_v1/product.py
index 23dcf48e..dc941f13 100644
--- a/indoteknik_api/controllers/api_v1/product.py
+++ b/indoteknik_api/controllers/api_v1/product.py
@@ -48,8 +48,9 @@ class Product(controller.Controller):
'manufacture_id': brand.id,
'sequence': brand.sequence if brand.sequence else count,
'name': brand.x_name,
- 'image': base_url + 'api/image/x_manufactures/x_logo_manufacture/' + str(
- brand.id) if brand.x_logo_manufacture else '',
+ # 'image': base_url + 'api/image/x_manufactures/x_logo_manufacture/' + str(
+ # brand.id) if brand.x_logo_manufacture else '',
+ 'image': request.env['ir.attachment'].api_image('x_manufactures', 'x_logo_manufacture', brand.id),
})
continue
@@ -74,8 +75,9 @@ class Product(controller.Controller):
'manufacture_id': brand.id,
'sequence': brand.sequence if brand.sequence else count,
'name': brand.x_name,
- 'image': base_url + 'api/image/x_manufactures/x_logo_manufacture/' + str(
- brand.id) if brand.x_logo_manufacture else '',
+ # 'image': base_url + 'api/image/x_manufactures/x_logo_manufacture/' + str(
+ # brand.id) if brand.x_logo_manufacture else '',
+ 'image': request.env['ir.attachment'].api_image('x_manufactures', 'x_logo_manufacture', brand.id),
'products_total': count_products,
'products': [request.env['product.template'].api_single_response(x) for x in products]
})