From dd3f514b17136169779d6fd106b64cda9854ab29 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Wed, 26 Jul 2023 15:06:42 +0700 Subject: user activity log --- indoteknik_custom/models/user_activity_log.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/indoteknik_custom/models/user_activity_log.py b/indoteknik_custom/models/user_activity_log.py index a1d74d61..cf40258f 100755 --- a/indoteknik_custom/models/user_activity_log.py +++ b/indoteknik_custom/models/user_activity_log.py @@ -136,8 +136,8 @@ class UserActivityLog(models.Model): ('url', 'ilike', 'https://indoteknik.com%/shop/product/%'), ('create_date', '>', delta_time), ('url', 'not ilike', 'shopping'), - # ('id', '=', 7806371), - ], limit=1000) + ], limit=2000, order='create_date DESC') + for activity_log in activity_logs: _logger.info(activity_log.url) strip_index = i = 0 @@ -160,11 +160,12 @@ class UserActivityLog(models.Model): def update_rank_search(self): activity_logs = self.env['user.activity.log'].search([ - ('url', 'ilike', '%/shop/product/%'), - ('update_product', '!=', True), - ], limit=1000) + ('url', 'ilike', '%/shop/product/%'), + ('update_product', '!=', True), + ('url', 'not ilike', 'shopping'), + ], limit=1000, order='create_date DESC') - for activity_log in activity_logs: + for activity_log in activity_logs: _logger.info(activity_log.url) strip_index = i = 0 for c in activity_log.url: -- cgit v1.2.3