diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2022-11-03 17:20:09 +0700 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2022-11-03 17:20:09 +0700 |
| commit | 665597d82f09e78fd7032a05c2686ae3eca74073 (patch) | |
| tree | b7c1226e5a94264fc43ce117f93330ea7fbf7965 /indoteknik_api/controllers/api_v1 | |
| parent | 8d204fc490ccd9dee49b86062f7063154887c0d9 (diff) | |
Update all manufacture response api
Diffstat (limited to 'indoteknik_api/controllers/api_v1')
| -rw-r--r-- | indoteknik_api/controllers/api_v1/manufacture.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/indoteknik_api/controllers/api_v1/manufacture.py b/indoteknik_api/controllers/api_v1/manufacture.py index 8dea6a4f..7d113b86 100644 --- a/indoteknik_api/controllers/api_v1/manufacture.py +++ b/indoteknik_api/controllers/api_v1/manufacture.py @@ -24,7 +24,10 @@ class Manufacture(controller.Controller): query.append(('x_manufacture_level', '=', level)) manufactures = request.env['x_manufactures'].search(query, limit=limit, offset=offset) - data = [request.env['x_manufactures'].api_single_response(x) for x in manufactures] + data = { + 'manufacture_total': request.env['x_manufactures'].search_count(query), + 'manufactures': [request.env['x_manufactures'].api_single_response(x) for x in manufactures] + } return self.response(data) |
