summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2023-07-28 04:32:46 +0000
committerIT Fixcomart <it@fixcomart.co.id>2023-07-28 04:32:46 +0000
commiteacf53b314861bc797e1222d4b8d7ae9ef677040 (patch)
treedf96ab2b2e680c79edefb4a606f148845ace0cf8
parente64105b97b5da3218e3dfbe5db4456b31f08ca73 (diff)
parente361ce63e944fe8e64302c0eec07befaa9f3d563 (diff)
Merged in production (pull request #75)
Production
-rwxr-xr-xindoteknik_custom/models/product_template.py13
-rwxr-xr-xindoteknik_custom/views/sale_order.xml3
2 files changed, 3 insertions, 13 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):
diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml
index ae16f649..f7f9c0ea 100755
--- a/indoteknik_custom/views/sale_order.xml
+++ b/indoteknik_custom/views/sale_order.xml
@@ -58,7 +58,8 @@
</xpath>
<field name="source_id" position="attributes">
<attribute name="domain">[('id', 'in', [32, 59, 60, 61])]</attribute>
- <attribute name="required">1</attribute>
+ <attribute name="attrs">{'required':[('create_date', '&gt;', '2023-07-30')]}
+ </attribute>
</field>
<xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='price_total']" position="after">
<field name="vendor_id" attrs="{'readonly': [('parent.approval_status', '=', 'approved')]}"/>