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 cf064ca4
authored
2023-06-21 09:14:11 -0300
by
Juan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Forzado try cach
1 parent
1bb65fa6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
models/incidencia.py
models/incidencia.py
View file @
cf064ca
...
...
@@ -227,12 +227,16 @@ class hgt_soporte_incidencia(models.Model):
for
user
in
users
:
if
self
.
env
.
user
.
has_group
(
'hgt_soporte.group_soporte_configurador'
):
if
user
.
CelularRecuperacion
!=
False
:
self
.
enviar_mensaje_ws
(
telefono
=
user
.
CelularRecuperacion
,
mensaje
=
mensaje
)
self
.
env
[
"hgt.telegram"
]
.
sudo
()
.
NotificarUsuario
(
mensaje
,
user
.
id
)
try
:
self
.
enviar_mensaje_ws
(
telefono
=
user
.
CelularRecuperacion
,
mensaje
=
mensaje
)
except
:
pass
try
:
self
.
env
[
"hgt.telegram"
]
.
sudo
()
.
NotificarUsuario
(
mensaje
,
user
.
id
)
except
:
pass
def
enviar_mensaje_ws
(
self
,
tipo
=
'Whatsapp'
,
mensaje
=
"mensaje"
,
titulo
=
"Titulo"
,
email
=
""
,
telefono
=
""
):
#Crea mensaje y lo envia
#Hay que agregar al modelo la relacion con los mensajes para tener trazavilidad
vals
=
{
"mensaje_nombre"
:
titulo
,
...
...
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