Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Maria Agustina
/
hgt_soporte
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 1ca58e38
authored
2022-11-27 20:17:07 -0300
by
juan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Envio de incidencia andando
1 parent
50c8b78b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
models/incidencia.py
views/incidencia_view.xml
models/incidencia.py
View file @
1ca58e3
...
...
@@ -133,7 +133,8 @@ class hgt_soporte_incidencia(models.Model):
def
enviarIncidencia
(
self
):
#funcion para la creacion de incidencias en modulo incidencias
#self.subida = True
self
.
estado
=
"abierta"
self
.
subida
=
True
URL
=
self
.
env
[
'ir.config_parameter'
]
.
sudo
()
.
search
([(
'key'
,
'='
,
'web.base.url'
)])
URL_local
=
str
(
URL
.
value
)
...
...
@@ -157,7 +158,8 @@ class hgt_soporte_incidencia(models.Model):
f
=
requests
.
post
(
f
"{HgtUrlBase}soporteIncidencias/crear"
,
data
=
datos_json
,
headers
=
headers
)
frespuesta
=
f
.
json
()
raise
UserError
(
str
(
frespuesta
))
if
frespuesta
[
"result"
][
"estado"
]
!=
"ok"
:
raise
UserError
(
str
(
frespuesta
))
#en frespuesta tengo el id de la incidencia creada en el otro modulo
#self.si_id_in = frespuesta
...
...
views/incidencia_view.xml
View file @
1ca58e3
...
...
@@ -60,7 +60,7 @@
<field
name=
"si_name"
colspan=
"2"
/>
<!-- <field colspan="2" name="si_numero" readonly="1" /> -->
<field
colspan=
"2"
name=
"si_fecha"
readonly=
"1"
/>
<field
colspan=
"2"
name=
"si_descripcion"
attrs=
"{'readonly':[
('si_cerra
da','=',True)]}"
/>
<field
colspan=
"2"
name=
"si_descripcion"
attrs=
"{'readonly':[
'|',('si_cerrada','=',True),('subi
da','=',True)]}"
/>
<field
colspan=
"2"
name=
"estado"
readonly=
"1"
/>
<field
colspan=
"2"
name=
"si_responsabilidad"
readonly=
"1"
/>
<field
colspan=
"2"
name=
"subida"
invisible=
"1"
/>
...
...
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