diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2025-01-20 12:20:43 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2025-01-20 12:20:43 +0700 |
| commit | d7a71c347eb3084416cf70c2010665a668491e48 (patch) | |
| tree | 66ea726f592fcdd3ae93ccd652e20bb9dad154b4 /indoteknik_api/controllers/api_v1/state.py | |
| parent | 1d5e4ca1fa58bcd59954a08b694f273d4c563cdf (diff) | |
| parent | 1b2b27941fcdaa1b1b6ddf2a4851d358abb259eb (diff) | |
Merge branch 'odoo-production' into iman/telegram
# Conflicts:
# indoteknik_custom/models/__init__.py
Diffstat (limited to 'indoteknik_api/controllers/api_v1/state.py')
| -rw-r--r-- | indoteknik_api/controllers/api_v1/state.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/indoteknik_api/controllers/api_v1/state.py b/indoteknik_api/controllers/api_v1/state.py index 598ef70b..958359a7 100644 --- a/indoteknik_api/controllers/api_v1/state.py +++ b/indoteknik_api/controllers/api_v1/state.py @@ -8,7 +8,11 @@ class District(controller.Controller): @http.route(prefix + 'state', auth='public', methods=['GET', 'OPTIONS']) @controller.Controller.must_authorized() def get_state(self, **kw): + tempo = kw.get('tempo') parameters = [] + if tempo == 'true': + parameters.append(('country_id', '=', 100)) + name = kw.get('name') if name: @@ -18,7 +22,7 @@ class District(controller.Controller): states = request.env['res.country.state'].search(parameters) data = [] for state in states: - data.append({ 'id': state.id, 'name': state.name }) + data.append({ 'id': state.id, 'name': state.name}) return self.response(data) |
