diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2023-08-04 07:32:55 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2023-08-04 07:32:55 +0000 |
| commit | e183c3662edc0ac493228c780b42c07eea00cc74 (patch) | |
| tree | 70e396dc08c26e77a94fbbe22edf07e96df88927 /indoteknik_api/models | |
| parent | ae7bed568731a6fda0156f2b170ba1bad84624be (diff) | |
| parent | 2421dad6c88900949bc2891bc25006ffa838dd78 (diff) | |
Merged in production (pull request #86)
Production
Diffstat (limited to 'indoteknik_api/models')
| -rw-r--r-- | indoteknik_api/models/product_product.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/indoteknik_api/models/product_product.py b/indoteknik_api/models/product_product.py index fb485bae..ff7c6498 100644 --- a/indoteknik_api/models/product_product.py +++ b/indoteknik_api/models/product_product.py @@ -250,6 +250,7 @@ class ProductProduct(models.Model): active_flash_sale = self.env['product.pricelist'].get_active_flash_sale() flashsale_id = 0 flashsale_name = '' + flashsale_tag = '' # loop pricelist items base_price = discount = price_flashsale = 0 for pricelist in active_flash_sale: @@ -261,6 +262,7 @@ class ProductProduct(models.Model): for item in pricelist_items: flashsale_id = pricelist.id flashsale_name = pricelist.name + flashsale_tag = pricelist.flashsale_tag base_price = self._get_website_price_exclude_tax() if item.price_discount > 0: discount = item.price_discount @@ -272,6 +274,7 @@ class ProductProduct(models.Model): data = { 'flashsale_id': flashsale_id, 'flashsale_name': flashsale_name, + 'flashsale_tag': flashsale_tag, 'flashsale_base_price': base_price, 'flashsale_discount': discount, 'flashsale_price': price_flashsale |
