Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Maria Agustina
/
hgt_incidencias
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 560f9b91
authored
2021-01-16 11:25:30 -0300
by
juan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Modulo para hgt
1 parent
eff637f9
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
14 deletions
__manifest__.py
models/incidencias.py
security/ir.model.access.csv
views/incidencias.xml
__manifest__.py
View file @
560f9b9
...
@@ -28,7 +28,8 @@
...
@@ -28,7 +28,8 @@
# always loaded
# always loaded
'data'
:
[
'data'
:
[
# 'security/ir.model.access.csv',
'security/permisos.xml'
,
'security/ir.model.access.csv'
,
'views/incidencias.xml'
,
'views/incidencias.xml'
,
'views/menu.xml'
,
'views/menu.xml'
,
...
...
models/incidencias.py
View file @
560f9b9
...
@@ -31,9 +31,16 @@ class hgt_incidencias(models.Model):
...
@@ -31,9 +31,16 @@ class hgt_incidencias(models.Model):
numero
=
fields
.
Char
(
string
=
'Numero de ticket'
)
numero
=
fields
.
Char
(
string
=
'Numero de ticket'
)
_sql_constraints
=
[(
'id_ost_uniq'
,
'unique (id_ost)'
,
'Id Ticket must be unique.'
)]
id_ost
=
fields
.
Integer
(
string
=
'Id osticket'
)
id_ost
=
fields
.
Integer
(
string
=
'Id osticket'
)
ost_cliente
=
fields
.
Char
(
string
=
'Ost cliente'
)
ost_asunto
=
fields
.
Char
(
string
=
'Ost asunto'
)
ost_mail
=
fields
.
Char
(
string
=
'Ost mail'
)
ost_telefeno
=
fields
.
Char
(
string
=
'Ost telefono'
)
fecha_creacion
=
fields
.
Date
(
fecha_creacion
=
fields
.
Date
(
string
=
u'Fecha de creación'
,
string
=
u'Fecha de creación'
,
...
@@ -81,16 +88,17 @@ class hgt_incidencias(models.Model):
...
@@ -81,16 +88,17 @@ class hgt_incidencias(models.Model):
iden
=
cant
+
1
iden
=
cant
+
1
datos
=
{
datos
=
{
'resumen'
:
'
Tarea para resolver Incidencia {}'
.
format
(
iden
),
'resumen'
:
'
Incidencia {} {}'
.
format
(
iden
,
vals
[
'ost_asunto'
]
),
'descripcion'
:
vals
[
'descripcion'
]
'descripcion'
:
vals
[
'descripcion'
]
}
}
nueva_tar
=
self
.
env
[
'hgt.tarea'
]
.
create
(
datos
)
nueva_tar
=
self
.
env
[
'hgt.tarea'
]
.
create
(
datos
)
try
:
if
vals
[
'accion'
]:
if
vals
[
'accion'
]:
accion
=
vals
[
'accion'
]
accion
=
vals
[
'accion'
]
acc
=
self
.
env
[
'hgt.acciones'
]
.
search
([(
'id'
,
'='
,
accion
)])
acc
=
self
.
env
[
'hgt.acciones'
]
.
search
([(
'id'
,
'='
,
accion
)])
acc
.
tareas
=
[(
4
,
nueva_tar
.
id
)]
acc
.
tareas
=
[(
4
,
nueva_tar
.
id
)]
except
:
pass
vals
[
'tarea'
]
=
nueva_tar
.
id
vals
[
'tarea'
]
=
nueva_tar
.
id
result
=
super
(
hgt_incidencias
,
self
)
.
create
(
vals
)
result
=
super
(
hgt_incidencias
,
self
)
.
create
(
vals
)
return
result
return
result
...
...
security/ir.model.access.csv
View file @
560f9b9
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_my_module_my_module,my_module.my_module,model_my_module_my_module,group_crm_incidentes,1,1,1,0
\ No newline at end of file
\ No newline at end of file
access_hgt_incidencias,access_hgt_incidencias,model_hgt_incidencias,group_crm_incidentes,1,1,1,0
\ No newline at end of file
\ No newline at end of file
views/incidencias.xml
View file @
560f9b9
...
@@ -20,9 +20,10 @@
...
@@ -20,9 +20,10 @@
<field
name=
"active"
eval=
"True"
/>
<field
name=
"active"
eval=
"True"
/>
<field
name=
"arch"
type=
"xml"
>
<field
name=
"arch"
type=
"xml"
>
<tree>
<tree>
<field
name=
"numero"
/>
<field
name=
"ost_asunto"
/>
<field
name=
"fecha_creacion"
/>
<field
name=
"fecha_creacion"
/>
<field
name=
"estado"
/>
<field
name=
"url"
widget=
"url"
/>
<field
name=
"responsabilidad"
/>
<field
name=
"descripcion"
/>
<field
name=
"descripcion"
/>
</tree>
</tree>
</field>
</field>
...
@@ -47,20 +48,33 @@
...
@@ -47,20 +48,33 @@
<field
colspan=
"2"
name=
"responsabilidad"
/>
<field
colspan=
"2"
name=
"responsabilidad"
/>
<field
colspan=
"2"
name=
"cliente"
/>
<field
colspan=
"2"
name=
"cliente"
/>
</group>
</group>
<notebook>
<h2>
Osticket
</h2>
<page
string=
"Descripción"
>
<group
col=
"2"
>
<field
name=
"url"
widget=
"url"
/>
<field
name=
"numero"
/>
<field
name=
"ost_cliente"
/>
</group>
<group
col=
"4"
>
<field
name=
"ost_mail"
/>
<field
name=
"ost_telefeno"
/>
</group>
<group
col=
"1"
>
<h2>
Asunto
</h2>
<field
name=
"ost_asunto"
nolabel=
"1"
/>
<h2>
Descripcion
</h2>
<field
name=
"descripcion"
nolabel=
"1"
/>
<field
name=
"descripcion"
nolabel=
"1"
/>
</page>
</group>
<page
string=
"Reporte"
>
<notebook>
<field
name=
"reporte"
nolabel=
"1"
/>
<page
string=
"Tareas"
>
</page>
<page
string=
"Tarea"
>
<group
col=
"4"
>
<group
col=
"4"
>
<field
name=
"proyecto"
colspan=
"2"
/>
<field
name=
"proyecto"
colspan=
"2"
/>
<field
name=
"accion"
colspan=
"2"
/>
<field
name=
"accion"
colspan=
"2"
/>
<field
name=
"tarea"
colspan=
"2"
readonly=
"1"
/>
<field
name=
"tarea"
colspan=
"2"
readonly=
"1"
/>
</group>
</group>
</page>
</page>
<page
string=
"Reporte"
>
<field
name=
"reporte"
nolabel=
"1"
/>
</page>
</notebook>
</notebook>
</sheet>
</sheet>
</form>
</form>
...
...
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