summaryrefslogtreecommitdiff
path: root/indoteknik_api/controllers/api_v1/state.py
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2025-01-21 13:53:28 +0700
committerit-fixcomart <it@fixcomart.co.id>2025-01-21 13:53:28 +0700
commit63433ff471ba98e6fc63bca16abd9a585471498b (patch)
tree7fe83758b1c40888bab68f5498e4a1c7da4d7891 /indoteknik_api/controllers/api_v1/state.py
parentff20b62d6932c6be4ffb56f63f3c05be3aa72c06 (diff)
parente3521c2153c36cee6629cee9146e1b4b0201da9f (diff)
Merge branch 'odoo-production' into CR/form-merchant
# Conflicts: # indoteknik_api/models/res_partner.py # indoteknik_api/models/res_users.py # indoteknik_custom/__manifest__.py # indoteknik_custom/models/__init__.py # indoteknik_custom/models/res_partner.py # indoteknik_custom/security/ir.model.access.csv # indoteknik_custom/views/res_partner.xml # indoteknik_custom/views/user_company_request.xml
Diffstat (limited to 'indoteknik_api/controllers/api_v1/state.py')
-rw-r--r--indoteknik_api/controllers/api_v1/state.py6
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)