diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2023-04-12 10:28:23 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2023-04-12 10:28:23 +0700 |
| commit | 4da2d3ba6ce8e3b52fe8c8bba4a07abe7b14db05 (patch) | |
| tree | 16f22ad6f4eec81800b6e4556d21d12d372a98f2 /indoteknik_api/models | |
| parent | c29187f2e1be3bed90ab8f4eece5bbc087861522 (diff) | |
fix bug sync flashsale to solr
Diffstat (limited to 'indoteknik_api/models')
| -rw-r--r-- | indoteknik_api/models/product_product.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_api/models/product_product.py b/indoteknik_api/models/product_product.py index 409b69c2..39cc9b28 100644 --- a/indoteknik_api/models/product_product.py +++ b/indoteknik_api/models/product_product.py @@ -141,14 +141,14 @@ class ProductProduct(models.Model): # loop pricelist items base_price = discount = price_flashsale = 0 for pricelist in active_flash_sale: - flashsale_id = pricelist.id - flashsale_name = pricelist.name query = [ ('pricelist_id', '=', pricelist.id), ('product_id', '=', self.id), ] pricelist_items = self.env['product.pricelist.item'].search(query, limit=1) for item in pricelist_items: + flashsale_id = pricelist.id + flashsale_name = pricelist.name base_price = self._get_website_price_exclude_tax() if item.price_discount > 0: discount = item.price_discount |
