Commit 1ef5133c by Juan

Ya se generan los recursos para puntos de retiro

1 parent eaa7e7b3
...@@ -2,4 +2,5 @@ ...@@ -2,4 +2,5 @@
from . import controllers from . import controllers
from . import altausuario from . import altausuario
from . import check
\ No newline at end of file \ No newline at end of file
from . import check
from . import recursos
\ No newline at end of file \ No newline at end of file
from odoo import http
import werkzeug
import random, os, json
import base64, string, random
class restablecedor(http.Controller):
"""Controlador acceso recursos publicos"""
@http.route('/lappa/tipificacion', auth='public', type='http' , website=True ,csrf=False, methods = ['POST','GET'])
def index(self, **kw):
tipo_transpor = http.request.env['trans.tipo_transporte'].sudo().search([])
no_transporta = http.request.env['trans.no_transporta'].sudo().search([])
tp = []
nt =[]
for tipo_transporte in tipo_transpor:
#print(tipo_transporte.id,tipo_transporte.tt_tipo)
tmp = [tipo_transporte.id,tipo_transporte.tt_tipo]
tp.append(tmp)
for no_trans in no_transporta:
#print(no_trans)
#print(no_trans.id,no_trans.name)
tmp = [no_trans.id,no_trans.name]
nt.append(tmp)
rta = {"tipo_transportista":tp,"no_transporta":nt}
#print(rta)
rt0 = json.dumps(rta)
return(rt0)
\ No newline at end of file \ No newline at end of file
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!