diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2023-05-09 15:50:22 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2023-05-09 15:50:22 +0700 |
| commit | 8454ff5a6641db8ba283fdc251647e60b96072e3 (patch) | |
| tree | 96a343a1edc63e154bfbf908a1e3ae64e6cdc780 | |
| parent | ed540db853df349df9739706159adcc209b971d8 (diff) | |
bf
| -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: |
