summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2023-07-26 15:06:42 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2023-07-26 15:06:42 +0700
commitdd3f514b17136169779d6fd106b64cda9854ab29 (patch)
treed515b09f9f69e86ec7864689eec483bde891871d
parent1988d339be9c737ec814bf84f59f4ae03ad7c32a (diff)
user activity log
-rwxr-xr-xindoteknik_custom/models/user_activity_log.py13
1 files 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: