Commit 560f9b91 by juan

Modulo para hgt

1 parent eff637f9
......@@ -28,7 +28,8 @@
# always loaded
'data': [
# 'security/ir.model.access.csv',
'security/permisos.xml',
'security/ir.model.access.csv',
'views/incidencias.xml',
'views/menu.xml',
......
......@@ -31,9 +31,16 @@ class hgt_incidencias(models.Model):
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')
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(
string=u'Fecha de creación',
......@@ -81,16 +88,17 @@ class hgt_incidencias(models.Model):
iden= cant + 1
datos = {
'resumen':'Tarea para resolver Incidencia {}'.format(iden),
'resumen':'Incidencia {} {}'.format(iden, vals['ost_asunto']),
'descripcion': vals['descripcion']
}
nueva_tar = self.env['hgt.tarea'].create(datos)
try:
if vals['accion']:
accion = vals['accion']
acc = self.env['hgt.acciones'].search([('id','=',accion)])
acc.tareas = [(4,nueva_tar.id)]
except:
pass
vals['tarea'] = nueva_tar.id
result = super(hgt_incidencias, self).create(vals)
return result
......
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
access_hgt_incidencias,access_hgt_incidencias,model_hgt_incidencias,group_crm_incidentes,1,1,1,0
\ No newline at end of file
......@@ -20,9 +20,10 @@
<field name="active" eval="True" />
<field name="arch" type="xml">
<tree>
<field name="numero" />
<field name="ost_asunto" />
<field name="fecha_creacion"/>
<field name="estado"/>
<field name="responsabilidad"/>
<field name="url" widget="url"/>
<field name="descripcion"/>
</tree>
</field>
......@@ -47,20 +48,33 @@
<field colspan="2" name="responsabilidad"/>
<field colspan="2" name="cliente"/>
</group>
<notebook>
<page string="Descripción">
<h2>Osticket</h2>
<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"/>
</page>
<page string="Reporte">
<field name="reporte" nolabel="1"/>
</page>
<page string="Tarea">
</group>
<notebook>
<page string="Tareas">
<group col="4">
<field name="proyecto" colspan="2" />
<field name="accion" colspan="2"/>
<field name="tarea" colspan="2" readonly="1"/>
</group>
</page>
<page string="Reporte">
<field name="reporte" nolabel="1"/>
</page>
</notebook>
</sheet>
</form>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!