Commit a5f45368 by Arturo Jasso Origel

se han agregado permisos y se han acomodado el dashboard para el conteo

parent 431e2cfa
......@@ -8,3 +8,4 @@ from . import helpdesk_team
from . import helpdesk_ticket
from . import helpdesk_settings
from . import helpdesk_sla
from . import ticket_dashboard
......@@ -8,7 +8,7 @@ class HelpdeskTeamInherit(models.Model):
short_name = fields.Char('Nombre corto',copy=False)
sequence_id = fields.Many2one('ir.sequence',string="Sequencia",copy=False)
is_support_team = fields.Boolean('Equipo de soporte')
team_admin_id = fields.Many2one('res.users',string="Administrador del equipo")
@api.onchange(short_name)
def convert_short_name_upper(self):
......
......@@ -45,7 +45,7 @@ class HelpdeskTicket(models.Model):
common_scenery = fields.Char("¿Qué escenarios son comunes a trabajar con esta transacción?")
module_impact = fields.Char("¿Tu solicitud, impacta de algún modo a algún otro Módulo?")
system_id = fields.Many2one('erp.system','Sistema')
team_admin_id = fields.Many2one('res.users',string="Administrador del equipo",related='team_id.team_admin_id')
def _get_color(self):
......
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<data>
<record id="ticket_auditor" model="res.groups">
......@@ -9,5 +9,28 @@
</record>
<record id="ticket_team_admin" model="res.groups">
<field name="category_id" ref="sh_all_in_one_helpdesk.module_helpdesk_category"/>
<field name="name">Administrador del equipo</field>
<field name="implied_ids" eval="[(4, ref('sh_all_in_one_helpdesk.helpdesk_group_team_leader'))]"/>
</record>
<record model="ir.rule" id="helpdesk_team_admin">
<field name="name">Helpdesk Administrador del equipo</field>
<field name="model_id" ref="sh_all_in_one_helpdesk.model_helpdesk_team" />
<field name="global" eval="True" />
<field name="domain_force">['|',('team_admin_id','=',user.id),('team_admin_id','=',False)]</field>
<field name="groups" eval="[(4, ref('helpdesk_morsa.ticket_team_admin'))]" />
</record>
<record model="ir.rule" id="helpdesk_ticket_team_admin">
<field name="name">Helpdesk Ticket Team Admin</field>
<field name="model_id" ref="sh_all_in_one_helpdesk.model_helpdesk_ticket" />
<field name="global" eval="True" />
<field name="domain_force">['|',('team_admin_id','=',user.id),('team_admin_id','=',False)]</field>
<field name="groups" eval="[(4, ref('helpdesk_morsa.ticket_team_admin'))]" />
</record>
</data>
</odoo>
\ No newline at end of file
......@@ -9,6 +9,9 @@
<xpath expr="//field[@name='name']" position="after">
<field name="short_name" required="1"/>
</xpath>
<xpath expr="//field[@name='team_head']" position="after">
<field name="team_admin_id"/>
</xpath>
</field>
</record>
</data>
......
......@@ -7,6 +7,9 @@
<field name="inherit_id" ref="sh_all_in_one_helpdesk.helpdesk_ticket_form_view"/>
<field name="priority" eval="17"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='team_head']" position="after">
<field name="team_admin_id"/>
</xpath>
<xpath expr="//field[@name='name']" position="after">
<field name="is_support" invisible="1"/>
<field name="is_erp" invisible="1"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment