diff options
| author | Stephan Christianus <stephanchrst@gmail.com> | 2023-01-16 10:02:53 +0000 |
|---|---|---|
| committer | Stephan Christianus <stephanchrst@gmail.com> | 2023-01-16 10:02:53 +0000 |
| commit | f3d44eb32705c07c28f688300d54c36e7e26bd10 (patch) | |
| tree | 69e3fa5c1a5b28da935435440d3eb99ef2a2117c /indoteknik_custom/models/product_template.py | |
| parent | 4cec68ef40a33071d949c33c1592c146779f1abe (diff) | |
| parent | f960f1c092cdb7669152f8caca7afad314a59877 (diff) | |
Merged in release (pull request #24)
Release
Diffstat (limited to 'indoteknik_custom/models/product_template.py')
| -rwxr-xr-x | indoteknik_custom/models/product_template.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py index ef0ead1b..74b4edb1 100755 --- a/indoteknik_custom/models/product_template.py +++ b/indoteknik_custom/models/product_template.py @@ -57,7 +57,6 @@ class ProductTemplate(models.Model): current_time = datetime.now() delta_time = current_time - timedelta(days=30) - #current_time = current_time.strftime('%Y-%m-%d %H:%M:%S') delta_time = delta_time.strftime('%Y-%m-%d %H:%M:%S') products = self.env['product.template'].search([ @@ -65,7 +64,7 @@ class ProductTemplate(models.Model): ('active', '=', True), ('product_rating', '>', 3), ('create_date', '>=', delta_time), - ], limit=1000) + ], limit=100) seq = 0 for product in products: @@ -146,7 +145,7 @@ class ProductTemplate(models.Model): ('active', '=', True), ('last_calculate_rating', '=', False), # ('id', '=', 22798), - ], limit=10000) + ], limit=100) for product in products: # print("Calculate Rating Product ", product) @@ -171,7 +170,7 @@ class ProductTemplate(models.Model): ('type', '=', 'product'), ('active', '=', True), ('last_calculate_rating', '<', delta_time), - ], limit=10000) + ], limit=100) for product in products: print("Calculate Rating Product OutOfDate", product) |
