diff options
| -rw-r--r-- | indoteknik_custom/models/apache_solr.py | 18 |
1 files 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: |
