diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2023-10-17 11:22:54 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2023-10-17 11:22:54 +0700 |
| commit | ee9255e9e404938fa7a49d8219b14101df84f8b9 (patch) | |
| tree | 7019e8428c6531e61f32d0d09cf60b96f8c254c3 /indoteknik_custom/models/solr | |
| parent | 464e80d0cb180335dada9878272c62f5db9b9e73 (diff) | |
| parent | 2c65cca19a67b66ac7d96eef0d6d74d3cee1740e (diff) | |
Merge branch 'production' of bitbucket.org:altafixco/indoteknik-addons into production
# Conflicts:
# indoteknik_custom/models/product_template.py
Diffstat (limited to 'indoteknik_custom/models/solr')
| -rw-r--r-- | indoteknik_custom/models/solr/product_product.py | 1 | ||||
| -rw-r--r-- | indoteknik_custom/models/solr/product_template.py | 3 |
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 31a0026d..720be7fa 100644 --- a/indoteknik_custom/models/solr/product_product.py +++ b/indoteknik_custom/models/solr/product_product.py @@ -64,6 +64,7 @@ class ProductProduct(models.Model): 'attributes': [x.name for x in variant.product_template_attribute_value_ids], 'has_product_info_b': True, 'publish_b': variant.product_tmpl_id.active and variant.product_tmpl_id.type == 'product', + 'qty_sold_f': variant.qty_sold }) self.solr().add(docs=[document], softCommit=True) diff --git a/indoteknik_custom/models/solr/product_template.py b/indoteknik_custom/models/solr/product_template.py index d7439bcb..cc8d4bf2 100644 --- a/indoteknik_custom/models/solr/product_template.py +++ b/indoteknik_custom/models/solr/product_template.py @@ -80,7 +80,8 @@ class ProductTemplate(models.Model): "category_name": category_name, "description_t": template.website_description or '', 'has_product_info_b': True, - 'publish_b': template.active and template.type == 'product' + 'publish_b': template.active and template.type == 'product', + "qty_sold_f": template.qty_sold }) self.solr().add(docs=[document], softCommit=True) |
