diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2024-08-26 13:42:31 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2024-08-26 13:42:31 +0700 |
| commit | 322aadd72ecb5a55c41397ecd32809f18373d53b (patch) | |
| tree | a6918233aba8ec3f47fd9decddc5f8e5447d07a8 | |
| parent | 630f9333673e7fe5ce5022022d7493fb8aa078d9 (diff) | |
cr image product
| -rw-r--r-- | indoteknik_custom/models/solr/product_product.py | 2 | ||||
| -rw-r--r-- | indoteknik_custom/models/solr/product_template.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/indoteknik_custom/models/solr/product_product.py b/indoteknik_custom/models/solr/product_product.py index ce85527c..35e3a4b3 100644 --- a/indoteknik_custom/models/solr/product_product.py +++ b/indoteknik_custom/models/solr/product_product.py @@ -57,7 +57,7 @@ class ProductProduct(models.Model): 'product_rating_f': variant.product_tmpl_id.virtual_rating, 'product_id_i': variant.id, 'template_id_i': variant.product_tmpl_id.id, - 'image_s': ir_attachment.api_image('product.template', 'image_256', variant.product_tmpl_id.id), + 'image_s': ir_attachment.api_image('product.template', 'image_512', variant.product_tmpl_id.id), 'stock_total_f': variant.qty_stock_vendor, 'weight_f': variant.weight, 'manufacture_id_i': variant.product_tmpl_id.x_manufacture.id or 0, diff --git a/indoteknik_custom/models/solr/product_template.py b/indoteknik_custom/models/solr/product_template.py index 970219c7..6f76c529 100644 --- a/indoteknik_custom/models/solr/product_template.py +++ b/indoteknik_custom/models/solr/product_template.py @@ -86,7 +86,7 @@ class ProductTemplate(models.Model): "default_code_s": template.default_code or '', "product_rating_f": template.virtual_rating, "product_id_i": template.id, - "image_s": self.env['ir.attachment'].api_image('product.template', 'image_256', template.id), + "image_s": self.env['ir.attachment'].api_image('product.template', 'image_512', template.id), "variant_total_i": template.product_variant_count, "stock_total_f": template.qty_stock_vendor, "weight_f": template.weight, @@ -95,6 +95,7 @@ class ProductTemplate(models.Model): "manufacture_name": template.x_manufacture.x_name or '', "image_promotion_1_s": self.env['ir.attachment'].api_image('x_manufactures', 'image_promotion_1', template.x_manufacture.id), "image_promotion_2_s": self.env['ir.attachment'].api_image('x_manufactures', 'image_promotion_2', template.x_manufacture.id), + 'x_logo_manufacture_s': self.env['ir.attachment'].api_image('x_manufactures', 'x_logo_manufacture', template.x_manufacture.id), "variants_name_t": variant_names, "variants_code_t": variant_codes, "search_rank_i": template.search_rank, |
