From 13b2ede1be57758fa80e9cd91ee34b35dc1e326f Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Wed, 26 Jul 2023 08:46:34 +0700 Subject: user activity log --- indoteknik_custom/models/user_activity_log.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/models/user_activity_log.py b/indoteknik_custom/models/user_activity_log.py index ef801ca5..0a530296 100755 --- a/indoteknik_custom/models/user_activity_log.py +++ b/indoteknik_custom/models/user_activity_log.py @@ -134,11 +134,12 @@ class UserActivityLog(models.Model): delta_time = delta_time.strftime('%Y-%m-%d %H:%M:%S') activity_logs = self.env['user.activity.log'].search([ - ('url', 'ilike', 'https://indoteknik.co%/shop/product/%'), + # ('url', 'ilike', 'https://indoteknik.com%/shop/product/%'), + ('url', 'ilike', '%/shop/product/%'), ('create_date', '>', delta_time), ('url', 'not ilike', 'shopping'), ], limit=1000) - 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 From 80ef09c12e6e6c23ca1977165cad1cad85940e62 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Wed, 26 Jul 2023 10:59:41 +0700 Subject: Add payment_schedule on bills menu --- indoteknik_custom/views/account_move.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/views/account_move.xml b/indoteknik_custom/views/account_move.xml index 26168561..11558bf4 100644 --- a/indoteknik_custom/views/account_move.xml +++ b/indoteknik_custom/views/account_move.xml @@ -59,6 +59,17 @@ + + Account Move + account.move + + + + + + + + Account Move account.move -- cgit v1.2.3 From ba6ef5090d092a618c0dee56c8bbe29684ae8688 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Wed, 26 Jul 2023 11:39:41 +0700 Subject: user activity log --- indoteknik_custom/models/user_activity_log.py | 30 ++++++++++++++------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/models/user_activity_log.py b/indoteknik_custom/models/user_activity_log.py index 0a530296..a1d74d61 100755 --- a/indoteknik_custom/models/user_activity_log.py +++ b/indoteknik_custom/models/user_activity_log.py @@ -130,14 +130,13 @@ class UserActivityLog(models.Model): current_time = datetime.now() delta_time = current_time - timedelta(days=7) - # current_time = current_time.strftime('%Y-%m-%d %H:%M:%S') delta_time = delta_time.strftime('%Y-%m-%d %H:%M:%S') activity_logs = self.env['user.activity.log'].search([ - # ('url', 'ilike', 'https://indoteknik.com%/shop/product/%'), - ('url', 'ilike', '%/shop/product/%'), + ('url', 'ilike', 'https://indoteknik.com%/shop/product/%'), ('create_date', '>', delta_time), ('url', 'not ilike', 'shopping'), + # ('id', '=', 7806371), ], limit=1000) for activity_log in activity_logs: _logger.info(activity_log.url) @@ -153,17 +152,16 @@ class UserActivityLog(models.Model): if any(ch.isalpha() for ch in product_id): continue template = self.env['product.template'].search([ - ('id', '=', product_id) + ('id', '=', int(product_id)) ], limit=1) - template.search_rank_weekly = int(template.search_rank_weekly) + int(1) - template.solr_flag = 2 + if template: + template.search_rank_weekly += 1 + template.solr_flag = 2 def update_rank_search(self): activity_logs = self.env['user.activity.log'].search([ ('url', 'ilike', '%/shop/product/%'), - ('update_product', '=', False), - # ('url', 'not ilike', '%/shop/product/%google-ads-shopping'), - # ('id', '=', 211957) + ('update_product', '!=', True), ], limit=1000) for activity_log in activity_logs: @@ -173,14 +171,18 @@ class UserActivityLog(models.Model): if c == '-': strip_index = i i += 1 - _logger.info(activity_log.url[strip_index+1:len(activity_log.url)]) - product_id = activity_log.url[strip_index+1:len(activity_log.url)] + _logger.info(activity_log.url[strip_index + 1:len(activity_log.url)]) + product_id = activity_log.url[strip_index + 1:len(activity_log.url)] if '#' in product_id: continue if any(ch.isalpha() for ch in product_id): continue template = self.env['product.template'].search([ - ('id', '=', product_id) + ('id', '=', int(product_id)) ], limit=1) - template.search_rank = int(template.search_rank) + int(1) - activity_log.update_product = True + if template: + template.search_rank += 1 + activity_log.update_product = True + + + -- cgit v1.2.3 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(-) (limited to 'indoteknik_custom') 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 From 4e942ec974303d0df73eecb270f2bcf127eaf2a7 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Thu, 27 Jul 2023 08:21:56 +0700 Subject: add qty stock vendor to product non altama --- indoteknik_custom/models/user_activity_log.py | 1 - 1 file changed, 1 deletion(-) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/models/user_activity_log.py b/indoteknik_custom/models/user_activity_log.py index cf40258f..9630e3ab 100755 --- a/indoteknik_custom/models/user_activity_log.py +++ b/indoteknik_custom/models/user_activity_log.py @@ -162,7 +162,6 @@ class UserActivityLog(models.Model): activity_logs = self.env['user.activity.log'].search([ ('url', 'ilike', '%/shop/product/%'), ('update_product', '!=', True), - ('url', 'not ilike', 'shopping'), ], limit=1000, order='create_date DESC') for activity_log in activity_logs: -- cgit v1.2.3 From 091d3159526442a41cc1026a7d54fbf5c2f951f8 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Thu, 27 Jul 2023 09:54:51 +0700 Subject: Tambah Source di Sales Order --- indoteknik_custom/views/sale_order.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml index 4570f43b..ae16f649 100755 --- a/indoteknik_custom/views/sale_order.xml +++ b/indoteknik_custom/views/sale_order.xml @@ -41,7 +41,7 @@ - + @@ -56,6 +56,10 @@ } + + [('id', 'in', [32, 59, 60, 61])] + 1 +