summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindoteknik_custom/models/product_template.py13
1 files changed, 1 insertions, 12 deletions
diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py
index 933c4676..e48136fa 100755
--- a/indoteknik_custom/models/product_template.py
+++ b/indoteknik_custom/models/product_template.py
@@ -181,18 +181,7 @@ class ProductTemplate(models.Model):
for product in products:
_logger.info("Calculate Rating Product %s" % product.id)
- rate = 0
- if product.web_price:
- rate += 1
- if product.have_promotion_program:
- rate += 1
- if product.image_128:
- rate += 5
- if product.website_description:
- rate += 1
- if product.product_variant_id.qty_stock_vendor > 0:
- rate += 1
- product.product_rating = rate
+ product.product_rating = product.virtual_rating
product.last_calculate_rating = current_time_str
def _get_stock_website(self):