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 f4cf73f5
authored
2022-11-29 14:24:27 -0300
by
juan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
nuevo metodo de genrar codigo
1 parent
cf9be52d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
models/incidencia.py
models/incidencia.py
View file @
f4cf73f
...
...
@@ -222,10 +222,13 @@ class hgt_soporte_incidencia(models.Model):
@api.model
def
create
(
self
,
values
):
rta
=
super
(
hgt_soporte_incidencia
,
self
)
.
create
(
values
)
empresa
=
self
.
env
[
'res.company'
]
.
_company_default_get
()
empresa
=
self
.
GenerarNombreEmpresa
()
rta
.
si_name
=
f
"{empresa.display_name} {str(rta.id).zfill(5)}"
return
(
rta
)
def
GenerarNombreEmpresa
(
self
):
return
(
self
.
env
[
'res.company'
]
.
_company_default_get
())
def
AgregarMensaje
(
self
):
msj
=
self
.
env
[
'soporte.mensaje_wiz'
]
.
create
({
"incidencia"
:
self
.
id
})
return
{
...
...
@@ -303,6 +306,8 @@ class hgt_soporte_incidencia(models.Model):
#print(opt,incidencia)
incidencia
.
estado
=
opt
[
"estado"
]
incidencia
.
horas
=
opt
[
"horas"
]
if
opt
[
"archivos"
]
!=
False
:
incidencia
.
archivos
=
opt
[
"archivos"
]
if
opt
[
"mensaje"
]
==
False
:
return
()
incidencia
.
Generarmensaje
(
opt
[
"mensaje"
],
opt
[
"usuario"
],
opt
[
"fecha"
])
...
...
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