diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2024-08-01 10:20:17 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2024-08-01 10:20:17 +0700 |
| commit | e4db1dffb90b6c611358fcaeeefacad89c82b676 (patch) | |
| tree | 59aff26b72e57306ad02be9cd3be5d1d21b935ac /indoteknik_custom/models | |
| parent | 18d87d85c18e8c628ce238032a2b49db8662df62 (diff) | |
fix error email reminder checkout
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 dd3f87e6..ad97a029 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 = [1102] + user_ids = [1102] for user in user_ids: - latest_cart = self.search([('user_id', '=', user.id), ('is_reminder', '=', False)], order='create_date desc', limit=1) + latest_cart = self.search([('user_id', '=', user), ('is_reminder', '=', False)], order='create_date desc', limit=1) - carts_to_remind = self.search([('user_id', '=', user.id)]) + carts_to_remind = self.search([('user_id', '=', user)]) if latest_cart and not latest_cart.is_reminder: for cart in carts_to_remind: check = cart.check_product_flashsale(cart.product_id.id) |
