Skip to content

Commit

Permalink
Revert "Agregando nueva rama 13.0 quitando cosas innecesarias que se …
Browse files Browse the repository at this point in the history
…agregaro…"
  • Loading branch information
camilozuluaga committed Dec 17, 2020
1 parent 0b65e87 commit 4ab8993
Show file tree
Hide file tree
Showing 12 changed files with 595 additions and 508 deletions.
3 changes: 2 additions & 1 deletion __manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
'base'
],
'data': [
'views/ciiu.xml',
'views/l10n_co_res_partner.xml',
'views/ciiu.xml',
'views/website.xml',
'data/ciiu.csv',
'data/l10n_states_co_data.xml',
'data/l10n_cities_co_data.xml',
Expand Down
16 changes: 13 additions & 3 deletions controllers/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,27 @@

class controller(http.Controller):

@http.route('/l10n_co_res_partner/get_partner_state_city', methods=['POST'], type='json', auth="public", website=True)
@http.route('/l10n_co_res_partner/get_partner_state_city/', methods=['POST'], type='json', auth="public", website=True)
def get_partner_state_city(self, **kw):
_response = {}
partner_id = kw.get('partner_id')
query = "select xcity from res_partner where id = " + str(partner_id)
query = "select xcity, state_id from res_partner where id = " + str(partner_id)
request.cr.execute(query)
partner_city = request.cr.dictfetchone()
_response['xcity_id_'] = partner_city
return _response

@http.route('/l10n_co_res_partner/get_partner_state/', methods=['POST'], type='json', auth="public", website=True)
def get_partner_state(self, **kw):
_response = {}
partner_id = kw.get('partner_id')
query = "select state_id from res_partner where id = " + str(partner_id)
request.cr.execute(query)
state_id = request.cr.dictfetchone()
_response['state_id'] = state_id
return _response

@http.route('/l10n_co_res_partner/get_state_city', methods=['POST'], type='json', auth="public", website=True)
@http.route('/l10n_co_res_partner/get_state_city/', methods=['POST'], type='json', auth="public", website=True)
def get_state_city(self, **kw):
_response = {'state_cities':None}
state_id_ = kw.get('state_id')
Expand Down
Loading

0 comments on commit 4ab8993

Please sign in to comment.