diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-11-28 10:43:58 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-11-28 10:43:58 +0700 |
| commit | b1af79a0ed73a7af2557c8269d82bbc99afaa601 (patch) | |
| tree | 6bf2ef8aec570bcb05b59a504ebeece215383845 /indoteknik_custom/models/solr | |
| parent | 56f2deda9cdf2a51d5a53aade7758a0ac9313e05 (diff) | |
| parent | 58bec36c52b223c12fd15511a56ab417ebbd7257 (diff) | |
Merge branch 'production' into iman/switch-account
# Conflicts:
# indoteknik_api/models/res_users.py
Diffstat (limited to 'indoteknik_custom/models/solr')
| -rw-r--r-- | indoteknik_custom/models/solr/product_product.py | 3 | ||||
| -rw-r--r-- | indoteknik_custom/models/solr/product_template.py | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/indoteknik_custom/models/solr/product_product.py b/indoteknik_custom/models/solr/product_product.py index 7c10a910..667511b2 100644 --- a/indoteknik_custom/models/solr/product_product.py +++ b/indoteknik_custom/models/solr/product_product.py @@ -54,7 +54,7 @@ class ProductProduct(models.Model): ('location_id', 'in', target_locations), ]) - is_in_bu = any(quant.available_quantity > 0 for quant in stock_quant) + is_in_bu = True if variant.qty_free_bandengan > 0 else False document = solr_model.get_doc('variants', variant.id) @@ -67,6 +67,7 @@ class ProductProduct(models.Model): 'product_id_i': variant.id, 'template_id_i': variant.product_tmpl_id.id, 'image_s': ir_attachment.api_image('product.template', 'image_512', variant.product_tmpl_id.id), + 'image_mobile_s': ir_attachment.api_image('product.template', 'image_256', 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 1d54cc9b..87e8370f 100644 --- a/indoteknik_custom/models/solr/product_template.py +++ b/indoteknik_custom/models/solr/product_template.py @@ -91,6 +91,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_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, "weight_f": template.weight, |
