summaryrefslogtreecommitdiff
path: root/indoteknik_api/controllers/api_v1/manufacture.py
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2023-08-03 06:15:54 +0000
committerIT Fixcomart <it@fixcomart.co.id>2023-08-03 06:15:54 +0000
commit0be8a77f6cbb31d3ac8cf9e3e606d2266a20c2ec (patch)
tree6f62bce6e049935b5a85e445ee7d959242fe7e7c /indoteknik_api/controllers/api_v1/manufacture.py
parentf0f30aa566c0e49b03fd86f86bbcd80d6c7383ce (diff)
parent4a670f1f85848ef46c605fd67ff4e3d305571522 (diff)
Merged in production (pull request #80)
Production
Diffstat (limited to 'indoteknik_api/controllers/api_v1/manufacture.py')
-rw-r--r--indoteknik_api/controllers/api_v1/manufacture.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/indoteknik_api/controllers/api_v1/manufacture.py b/indoteknik_api/controllers/api_v1/manufacture.py
index 345fd660..cbee253d 100644
--- a/indoteknik_api/controllers/api_v1/manufacture.py
+++ b/indoteknik_api/controllers/api_v1/manufacture.py
@@ -16,6 +16,7 @@ class Manufacture(controller.Controller):
level = kw.get('level')
limit = int(kw.get('limit', 0))
offset = int(kw.get('offset', 0))
+ order = 'sequence ASC'
if name:
name = '%' + name.replace(' ', '%') + '%' if '%' not in name else name
@@ -26,7 +27,7 @@ class Manufacture(controller.Controller):
return self.response(code=400, description='level possible value is prioritas, gold, silver')
query.append(('x_manufacture_level', '=', level))
- manufactures = request.env['x_manufactures'].search(query, limit=limit, offset=offset)
+ manufactures = request.env['x_manufactures'].search(query, order=order, limit=limit, offset=offset)
data = {
'manufacture_total': request.env['x_manufactures'].search_count(query),
'manufactures': [request.env['x_manufactures'].api_single_response(x) for x in manufactures]