From 90cb7578cac9229ab3e11f7a82bd6ee997333d6d Mon Sep 17 00:00:00 2001 From: IT Fixcomart Date: Fri, 14 Oct 2022 09:02:31 +0700 Subject: default product_rating and web_price_sorting --- indoteknik_custom/models/product_template.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py index 8291a517..7b5d07f4 100755 --- a/indoteknik_custom/models/product_template.py +++ b/indoteknik_custom/models/product_template.py @@ -28,9 +28,9 @@ class ProductTemplate(models.Model): qty_stock_vendor = fields.Float('QTY Stock Vendor', compute='_compute_qty_stock_vendor') have_promotion_program = fields.Boolean('Have Promotion Program', compute='_have_promotion_program', help="Punya promotion program gak?") - product_rating = fields.Float('Product Rating', help="Digunakan untuk sorting product di website") + product_rating = fields.Float('Product Rating', help="Digunakan untuk sorting product di website", default=0.0) last_calculate_rating = fields.Datetime("Last Calculate Rating") - web_price_sorting = fields.Float('Web Price Sorting', help='Hanya digunakan untuk sorting di web, harga tidak berlaku') + web_price_sorting = fields.Float('Web Price Sorting', help='Hanya digunakan untuk sorting di web, harga tidak berlaku', default=0.0) def _compute_qty_stock_vendor(self): for product_template in self: -- cgit v1.2.3