Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Maria Agustina
/
hgt_transportar
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 1ef5133c
authored
2022-07-19 11:33:07 -0300
by
Juan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Ya se generan los recursos para puntos de retiro
1 parent
eaa7e7b3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
controllers/__init__.py
controllers/recursos.py
controllers/__init__.py
View file @
1ef5133
...
@@ -3,3 +3,4 @@
...
@@ -3,3 +3,4 @@
from
.
import
controllers
from
.
import
controllers
from
.
import
altausuario
from
.
import
altausuario
from
.
import
check
from
.
import
check
from
.
import
recursos
\ No newline at end of file
\ No newline at end of file
controllers/recursos.py
0 → 100644
View file @
1ef5133
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
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment