From b9b91b0e8a37ca96748304afea83812884b4811e Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Thu, 27 Jul 2023 13:06:15 +0700 Subject: fix source so --- indoteknik_custom/views/sale_order.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml index ae16f649..3b5bc4c5 100755 --- a/indoteknik_custom/views/sale_order.xml +++ b/indoteknik_custom/views/sale_order.xml @@ -58,7 +58,6 @@ [('id', 'in', [32, 59, 60, 61])] - 1 -- cgit v1.2.3 From c6c59089732d912d9bc9c8a95028ddb1addcfb5a Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Thu, 27 Jul 2023 13:11:17 +0700 Subject: fix source so --- indoteknik_custom/views/sale_order.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml index 3b5bc4c5..9ff000e7 100755 --- a/indoteknik_custom/views/sale_order.xml +++ b/indoteknik_custom/views/sale_order.xml @@ -58,6 +58,8 @@ [('id', 'in', [32, 59, 60, 61])] + {'required':['|',('create_date', '>', '2023-07-30'), ('create_date', '=', False)]} + -- cgit v1.2.3 From 9f842a12e4875039622ac3140495b773cc39da5e Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Thu, 27 Jul 2023 14:27:25 +0700 Subject: Update calculate rating product function on product_template --- indoteknik_custom/models/product_template.py | 13 +------------ 1 file changed, 1 insertion(+), 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): -- cgit v1.2.3 From e361ce63e944fe8e64302c0eec07befaa9f3d563 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Thu, 27 Jul 2023 15:11:28 +0700 Subject: fix source so --- indoteknik_custom/views/sale_order.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml index 9ff000e7..f7f9c0ea 100755 --- a/indoteknik_custom/views/sale_order.xml +++ b/indoteknik_custom/views/sale_order.xml @@ -58,7 +58,7 @@ [('id', 'in', [32, 59, 60, 61])] - {'required':['|',('create_date', '>', '2023-07-30'), ('create_date', '=', False)]} + {'required':[('create_date', '>', '2023-07-30')]} -- cgit v1.2.3