summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2025-05-02 22:19:01 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2025-05-02 22:19:01 +0700
commit42671e5f4afd1d9646569791704bf9d66f265b5e (patch)
treee2e3b743899bfdc2c00664c06ead5b5b77bc65c3
parentc48bd5f7fba6e75fe73a170ac3fbefbf3ac051e5 (diff)
trying to fix image_carousel
-rw-r--r--indoteknik_custom/models/solr/product_template.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/indoteknik_custom/models/solr/product_template.py b/indoteknik_custom/models/solr/product_template.py
index 997415dc..d9e83401 100644
--- a/indoteknik_custom/models/solr/product_template.py
+++ b/indoteknik_custom/models/solr/product_template.py
@@ -96,7 +96,10 @@ class ProductTemplate(models.Model):
"product_rating_f": template.virtual_rating,
"product_id_i": template.id,
"image_s": self.env['ir.attachment'].api_image('product.template', 'image_512', template.id),
- "image_carousel_s": [self.env['ir.attachment'].api_image('image.carousel', 'image', carousel.id) for carousel in template.image_carousel_lines],
+ 'image_carousel_s': {'set': [
+ self.env['ir.attachment'].api_image('image.carousel', 'image', carousel.id)
+ for carousel in template.image_carousel_lines
+ ]},
'image_mobile_s': self.env['ir.attachment'].api_image('product.template', 'image_256', template.id),
"variant_total_i": template.product_variant_count,
"stock_total_f": template.qty_stock_vendor,