summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2023-05-03 15:39:29 +0700
committerstephanchrst <stephanchrst@gmail.com>2023-05-03 15:39:29 +0700
commit58395396f83290cd36b7faf693c0efafc726ad61 (patch)
treef178933b953d81b9ae1f589c61b05655b09ebe83
parent515addbceca9df25b3aaf440e8687286620d603a (diff)
change rating product
-rwxr-xr-xindoteknik_custom/models/product_template.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py
index a43d8dc2..49235ec7 100755
--- a/indoteknik_custom/models/product_template.py
+++ b/indoteknik_custom/models/product_template.py
@@ -58,15 +58,15 @@ class ProductTemplate(models.Model):
for product in self:
rate = 0
if product.web_price:
- rate += 1
+ rate += 4
if product.have_promotion_program: #have discount from pricelist
- rate += 1
- if product.image_128:
rate += 5
+ if product.image_128:
+ rate += 3
if product.website_description:
rate += 1
if product.product_variant_id.qty_stock_vendor > 0:
- rate += 1
+ rate += 2
product.virtual_rating = rate
def update_new_product(self):