diff options
| -rw-r--r-- | indoteknik_api/models/product_pricelist.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/indoteknik_api/models/product_pricelist.py b/indoteknik_api/models/product_pricelist.py index 2e825740..744faaee 100644 --- a/indoteknik_api/models/product_pricelist.py +++ b/indoteknik_api/models/product_pricelist.py @@ -105,10 +105,12 @@ class ProductPricelist(models.Model): is_show_program = True else: is_show_program = False + + current_time = datetime.now().strftime('%Y-%m-%d %H:%M:%S') pricelist = self.search([ ('is_flash_sale', '=', True), - ('is_show_program', '=', is_show_program), + ('is_show_program', '=', True), ('start_date', '<=', current_time), ('end_date', '>=', current_time) ], order='start_date asc') |
