diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2024-07-31 15:12:47 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2024-07-31 15:12:47 +0700 |
| commit | 36b776cda52f7186d9630831acbaaceae4ac4c56 (patch) | |
| tree | 26ad064deda2e8a630c908a53329d09e3434df23 /indoteknik_custom/models | |
| parent | 01b2fc531d349418ea4b53170688b909c7ea6e8c (diff) | |
email reminder checkout cart
Diffstat (limited to 'indoteknik_custom/models')
| -rw-r--r-- | indoteknik_custom/models/website_user_cart.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/indoteknik_custom/models/website_user_cart.py b/indoteknik_custom/models/website_user_cart.py index e4b10178..dd3f87e6 100644 --- a/indoteknik_custom/models/website_user_cart.py +++ b/indoteknik_custom/models/website_user_cart.py @@ -131,13 +131,13 @@ class WebsiteUserCart(models.Model): return result def action_mail_reminder_to_checkout(self): - # user_ids = self.search([]).mapped('user_id') + user_ids = self.search([]).mapped('user_id') - user_ids = [101] + # user_ids = [1102] for user in user_ids: - latest_cart = self.search([('user_id', '=', user), ('is_reminder', '=', False)], order='create_date desc', limit=1) + latest_cart = self.search([('user_id', '=', user.id), ('is_reminder', '=', False)], order='create_date desc', limit=1) - carts_to_remind = self.search([('user_id', '=', user)]) + carts_to_remind = self.search([('user_id', '=', user.id)]) if latest_cart and not latest_cart.is_reminder: for cart in carts_to_remind: check = cart.check_product_flashsale(cart.product_id.id) |
