diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2025-05-02 16:38:48 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2025-05-02 16:38:48 +0700 |
| commit | dcfe69ad989118ce2d8dc41a9af1ece6b5a57d76 (patch) | |
| tree | 82f122db722a0d1634ca2ca6c8af401ef465e615 /indoteknik_custom/models/solr/product_template.py | |
| parent | da5754b2be5996cdffbe0ba778ed3b1fa6cf7d73 (diff) | |
image carousel product
Diffstat (limited to 'indoteknik_custom/models/solr/product_template.py')
| -rw-r--r-- | indoteknik_custom/models/solr/product_template.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/indoteknik_custom/models/solr/product_template.py b/indoteknik_custom/models/solr/product_template.py index 8afff6e3..1f0ce918 100644 --- a/indoteknik_custom/models/solr/product_template.py +++ b/indoteknik_custom/models/solr/product_template.py @@ -26,7 +26,7 @@ class ProductTemplate(models.Model): 'function_name': function_name }) - @api.constrains('name', 'default_code', 'weight', 'x_manufacture', 'public_categ_ids', 'search_rank', 'search_rank_weekly', 'image_1920', 'unpublished') + @api.constrains('name', 'default_code', 'weight', 'x_manufacture', 'public_categ_ids', 'search_rank', 'search_rank_weekly', 'image_1920', 'unpublished','image_carousel_lines') def _create_solr_queue_sync_product_template(self): self._create_solr_queue('_sync_product_template_to_solr') @@ -94,6 +94,7 @@ 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.product_id.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, |
