From 8454ff5a6641db8ba283fdc251647e60b96072e3 Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Tue, 9 May 2023 15:50:22 +0700 Subject: bf --- indoteknik_custom/models/apache_solr.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/indoteknik_custom/models/apache_solr.py b/indoteknik_custom/models/apache_solr.py index 54b87751..86039716 100644 --- a/indoteknik_custom/models/apache_solr.py +++ b/indoteknik_custom/models/apache_solr.py @@ -42,15 +42,15 @@ class ApacheSolr(models.Model): current_time = current_time.strftime('%Y-%m-%d %H:%M:%S') delta_time = delta_time.strftime('%Y-%m-%d %H:%M:%S') - # query = [ - # '&','&', - # ('type', '=', 'product'), - # ('active', '=', True), - # '|', - # ('last_calculate_rating', '=', False), - # ('last_calculate_rating', '<', delta_time), - # ] - query = [('id', '=', 97942)] + query = [ + '&','&', + ('type', '=', 'product'), + ('active', '=', True), + '|', + ('last_calculate_rating', '=', False), + ('last_calculate_rating', '<', delta_time), + ] + # query = [('id', '=', 97942)] templates = self.env['product.template'].search(query, limit=limit) documents=[] for template in templates: -- cgit v1.2.3