Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Maria Agustina
/
hgt_llamadas
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 51a9086d
authored
2021-01-05 14:25:27 -0300
by
juan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Correcciones de usabilidad
1 parent
d7c4d2d4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
models/__init__.py
wizards/llamadas_pendientes.py
models/__init__.py
View file @
51a9086
# -*- coding: utf-8 -*-
from
.
import
instituciones
from
.
import
contactos
\ No newline at end of file
#from . import instituciones
#from . import contactos
\ No newline at end of file
wizards/llamadas_pendientes.py
View file @
51a9086
...
...
@@ -9,10 +9,12 @@ class hgt_llamada_pendiente(models.TransientModel):
string
=
u'Organización'
,
comodel_name
=
'hgt.instituciones'
,
ondelete
=
'restrict'
,
default
=
lambda
self
:
self
.
ong
()
)
fecha_llamada
=
fields
.
Datetime
(
string
=
'Fecha y hora de la llamada'
,
default
=
fields
.
Date
.
context_today
,
)
fecha_hoy
=
fields
.
Date
(
...
...
@@ -22,7 +24,8 @@ class hgt_llamada_pendiente(models.TransientModel):
medio
=
fields
.
Selection
(
string
=
u'Medio'
,
selection
=
[(
'Telefono'
,
'Teléfono'
),
(
'Whatsapp'
,
'Whatsapp'
),
(
'E-Mail'
,
'E-Mail'
),]
selection
=
[(
'Telefono'
,
'Teléfono'
),
(
'Whatsapp'
,
'Whatsapp'
),
(
'E-Mail'
,
'E-Mail'
),],
default
=
'Telefono'
)
notas
=
fields
.
Text
(
...
...
@@ -66,6 +69,13 @@ class hgt_llamada_pendiente(models.TransientModel):
string
=
'Temas a tratar'
,
)
def
ong
(
self
):
ids
=
self
.
env
.
context
.
get
(
'active_ids'
,
[])
try
:
return
(
ids
[
0
])
except
:
return
(
False
)
@api.onchange
(
'organizacion'
)
def
dominio_personas
(
self
):
result
=
{}
...
...
@@ -81,10 +91,17 @@ class hgt_llamada_pendiente(models.TransientModel):
result
[
'domain'
]
=
[]
person
=
self
.
persona
ids
=
self
.
persona
.
contactos
.
ids
#print(ids)
default
=
self
.
env
[
"asw.contactos"
]
.
search
([(
'id'
,
'in'
,
ids
)])
#print(default)
if
not
len
(
default
)
==
0
:
self
.
contacto
=
default
[
0
]
result
[
'domain'
]
=
{
'contacto'
:
[(
'id'
,
'in'
,
ids
)]}
return
result
def
crear_tarea
(
self
):
#import ipdb; ipdb.set_trace()
if
self
.
otro
:
#creo el contacto
vals
=
{
...
...
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