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 -*-
# -*- coding: utf-8 -*-
from
.
import
instituciones
from
.
import
contactos
\ No newline at end of file
\ No newline at end of file
#from . import instituciones
#from . import contactos
\ No newline at end of file
\ No newline at end of file
wizards/llamadas_pendientes.py
View file @
51a9086
...
@@ -9,10 +9,12 @@ class hgt_llamada_pendiente(models.TransientModel):
...
@@ -9,10 +9,12 @@ class hgt_llamada_pendiente(models.TransientModel):
string
=
u'Organización'
,
string
=
u'Organización'
,
comodel_name
=
'hgt.instituciones'
,
comodel_name
=
'hgt.instituciones'
,
ondelete
=
'restrict'
,
ondelete
=
'restrict'
,
default
=
lambda
self
:
self
.
ong
()
)
)
fecha_llamada
=
fields
.
Datetime
(
fecha_llamada
=
fields
.
Datetime
(
string
=
'Fecha y hora de la llamada'
,
string
=
'Fecha y hora de la llamada'
,
default
=
fields
.
Date
.
context_today
,
)
)
fecha_hoy
=
fields
.
Date
(
fecha_hoy
=
fields
.
Date
(
...
@@ -22,7 +24,8 @@ class hgt_llamada_pendiente(models.TransientModel):
...
@@ -22,7 +24,8 @@ class hgt_llamada_pendiente(models.TransientModel):
medio
=
fields
.
Selection
(
medio
=
fields
.
Selection
(
string
=
u'Medio'
,
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
(
notas
=
fields
.
Text
(
...
@@ -66,6 +69,13 @@ class hgt_llamada_pendiente(models.TransientModel):
...
@@ -66,6 +69,13 @@ class hgt_llamada_pendiente(models.TransientModel):
string
=
'Temas a tratar'
,
string
=
'Temas a tratar'
,
)
)
def
ong
(
self
):
ids
=
self
.
env
.
context
.
get
(
'active_ids'
,
[])
try
:
return
(
ids
[
0
])
except
:
return
(
False
)
@api.onchange
(
'organizacion'
)
@api.onchange
(
'organizacion'
)
def
dominio_personas
(
self
):
def
dominio_personas
(
self
):
result
=
{}
result
=
{}
...
@@ -81,10 +91,17 @@ class hgt_llamada_pendiente(models.TransientModel):
...
@@ -81,10 +91,17 @@ class hgt_llamada_pendiente(models.TransientModel):
result
[
'domain'
]
=
[]
result
[
'domain'
]
=
[]
person
=
self
.
persona
person
=
self
.
persona
ids
=
self
.
persona
.
contactos
.
ids
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
)]}
result
[
'domain'
]
=
{
'contacto'
:
[(
'id'
,
'in'
,
ids
)]}
return
result
return
result
def
crear_tarea
(
self
):
def
crear_tarea
(
self
):
#import ipdb; ipdb.set_trace()
if
self
.
otro
:
if
self
.
otro
:
#creo el contacto
#creo el contacto
vals
=
{
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