From 1b1285582285d0701f41e2f2e1b778d372cd470a Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Fri, 6 Oct 2023 11:41:29 +0700 Subject: Fix flashsale price on calculate web price API --- indoteknik_api/models/product_product.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indoteknik_api/models/product_product.py b/indoteknik_api/models/product_product.py index d370e52b..aa9e0ad7 100644 --- a/indoteknik_api/models/product_product.py +++ b/indoteknik_api/models/product_product.py @@ -273,7 +273,7 @@ class ProductProduct(models.Model): base_price = 0 if base_pricelist: - base_price = base_pricelist.computed_price + base_price = base_pricelist.computed_price / 1.11 discount = 0 price_flashsale = 0 @@ -285,7 +285,7 @@ class ProductProduct(models.Model): discount = (base_price - price_flashsale) // base_price * 100 if price_for == 'odoo': - base_price = self._v2_get_website_price_include_tax() + base_price = self._v2_get_website_price_exclude_tax() discount = (base_price - price_flashsale) / base_price * 100 jkt_tz = pytz.timezone('Asia/Jakarta') -- cgit v1.2.3