diff options
Diffstat (limited to 'indoteknik_api/controllers/api_v1')
| -rw-r--r-- | indoteknik_api/controllers/api_v1/product.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_api/controllers/api_v1/product.py b/indoteknik_api/controllers/api_v1/product.py index 7e86bafd..fc8e2610 100644 --- a/indoteknik_api/controllers/api_v1/product.py +++ b/indoteknik_api/controllers/api_v1/product.py @@ -30,7 +30,7 @@ class Product(controller.Controller): ('website_description', '!=', False), # ('create_date', '>=', delta_time), ] - new_products = request.env['product.template'].search(query_products, order='create_date', limit=250) + new_products = request.env['product.template'].search(query_products, order='create_date desc', limit=250) brands = [] for product in new_products: brands.append(product.x_manufacture) @@ -63,7 +63,7 @@ class Product(controller.Controller): if count_products < 6: _logger.info('Brand Skipped %s' % brand.x_name) continue - products = request.env['product.template'].search(query, order='name', limit=12) + products = request.env['product.template'].search(query, order='create_date desc', limit=12) data.append({ 'manufacture_id': brand.id, 'sequence': brand.sequence if brand.sequence else count, |
