Commit 601e6716 by Arturo Jasso Origel

se comentaron respuesta de ticket sin evaluar, se agrego un cambio en la vista…

se comentaron respuesta de ticket sin evaluar, se agrego un cambio en la vista formulario en helpdesk_ticket se agrego un metodo al ticket_dashboard donde se muestren todos los tickets, adem, se agregaron nuevos campos como el de descripción de solución y además se agregó un campo de verficación de cambio de usuarios en helpdesk_ticket adempas de los permisos, dentro de backend se agrego una manera de agregar le header de manera fija
parent 8db09f28
...@@ -358,13 +358,13 @@ class PortalHelpdeskMorsaEmergency(PortalHelpdesk): ...@@ -358,13 +358,13 @@ class PortalHelpdeskMorsaEmergency(PortalHelpdesk):
if not partner_id: if not partner_id:
return json.dumps({"resp":"Error","message":"Colaborador no encontrado, favor de verificar que haya agregado uno"}) return json.dumps({"resp":"Error","message":"Colaborador no encontrado, favor de verificar que haya agregado uno"})
if partner_id: if partner_id:
unvalued_tickets = len( #unvalued_tickets = len(
request.env['helpdesk.ticket'].sudo().search([ # request.env['helpdesk.ticket'].sudo().search([
('stage_id','=',request.env.ref('sh_all_in_one_helpdesk.done_stage').id), # ('stage_id','=',request.env.ref('sh_all_in_one_helpdesk.done_stage').id),
('priority_new','=',False)]) # ('priority_new','=',False)])
) # )
if unvalued_tickets >= 3: #if unvalued_tickets >= 3:
return json.dumps({"resp":"Error","message":"Tienes demasiados tickets sin evaluar, favor de evaluarlos"}) # return json.dumps({"resp":"Error","message":"Tienes demasiados tickets sin evaluar, favor de evaluarlos"})
ticket_dic = { ticket_dic = {
'partner_id': partner_id.id, 'partner_id': partner_id.id,
'ticket_from_portal': True 'ticket_from_portal': True
......
...@@ -377,13 +377,13 @@ class PortalHelpdeskMorsaErp(PortalHelpdesk): ...@@ -377,13 +377,13 @@ class PortalHelpdeskMorsaErp(PortalHelpdesk):
if not partner_id: if not partner_id:
return json.dumps({"resp":"Error","message":"Colaborador no encontrado, favor de verificar que haya agregado uno"}) return json.dumps({"resp":"Error","message":"Colaborador no encontrado, favor de verificar que haya agregado uno"})
if partner_id: if partner_id:
unvalued_tickets = len( #unvalued_tickets = len(
request.env['helpdesk.ticket'].sudo().search([ # request.env['helpdesk.ticket'].sudo().search([
('stage_id','=',request.env.ref('sh_all_in_one_helpdesk.done_stage').id), # ('stage_id','=',request.env.ref('sh_all_in_one_helpdesk.done_stage').id),
('priority_new','=',False)]) # ('priority_new','=',False)])
) # )
if unvalued_tickets >= 3: #if unvalued_tickets >= 3:
return json.dumps({"resp":"Error","message":"Tienes demasiados tickets sin evaluar, favor de evaluarlos"}) # return json.dumps({"resp":"Error","message":"Tienes demasiados tickets sin evaluar, favor de evaluarlos"})
ticket_dic = { ticket_dic = {
'partner_id': partner_id.id, 'partner_id': partner_id.id,
'ticket_from_portal': True 'ticket_from_portal': True
......
...@@ -360,13 +360,13 @@ class PortalHelpdeskMorsaSoporte(PortalHelpdesk): ...@@ -360,13 +360,13 @@ class PortalHelpdeskMorsaSoporte(PortalHelpdesk):
if not partner_id: if not partner_id:
return json.dumps({"resp":"Error","message":"Colaborador no encontrado, favor de verificar que haya agregado uno"}) return json.dumps({"resp":"Error","message":"Colaborador no encontrado, favor de verificar que haya agregado uno"})
if partner_id: if partner_id:
unvalued_tickets = len( #unvalued_tickets = len(
request.env['helpdesk.ticket'].sudo().search([ # request.env['helpdesk.ticket'].sudo().search([
('stage_id','=',request.env.ref('sh_all_in_one_helpdesk.done_stage').id), # ('stage_id','=',request.env.ref('sh_all_in_one_helpdesk.done_stage').id),
('priority_new','=',False)]) # ('priority_new','=',False)])
) # )
if unvalued_tickets >= 3: #if unvalued_tickets >= 3:
return json.dumps({"resp":"Error","message":"Tienes demasiados tickets sin evaluar, favor de evaluarlos"}) # return json.dumps({"resp":"Error","message":"Tienes demasiados tickets sin evaluar, favor de evaluarlos"})
ticket_dic = { ticket_dic = {
'partner_id': partner_id.id, 'partner_id': partner_id.id,
'ticket_from_portal': True 'ticket_from_portal': True
......
...@@ -9,3 +9,4 @@ from . import helpdesk_ticket ...@@ -9,3 +9,4 @@ from . import helpdesk_ticket
from . import helpdesk_settings from . import helpdesk_settings
from . import helpdesk_sla from . import helpdesk_sla
from . import ticket_dashboard from . import ticket_dashboard
from . import user_change_information
...@@ -51,7 +51,8 @@ class HelpdeskTicket(models.Model): ...@@ -51,7 +51,8 @@ class HelpdeskTicket(models.Model):
system_id = fields.Many2one('erp.system','Sistema') system_id = fields.Many2one('erp.system','Sistema')
team_admin_id = fields.Many2one('res.users',string="Administrador del equipo",related='team_id.team_admin_id') team_admin_id = fields.Many2one('res.users',string="Administrador del equipo",related='team_id.team_admin_id')
comp_morsa = fields.Selection(related="partner_id.user_ids.comp_morsa",string='Empresa') comp_morsa = fields.Selection(related="partner_id.user_ids.comp_morsa",string='Empresa')
user_changes_ids = fields.One2many('user.ticket.assign', 'ticket_id',string="Cambio de usuario")
descripcion_solution = fields.Text('Descripción de solución')
def _get_color(self): def _get_color(self):
in_progress_stage = self.env.ref('sh_all_in_one_helpdesk.in_progress_stage').id in_progress_stage = self.env.ref('sh_all_in_one_helpdesk.in_progress_stage').id
...@@ -325,7 +326,16 @@ class HelpdeskTicket(models.Model): ...@@ -325,7 +326,16 @@ class HelpdeskTicket(models.Model):
}) })
def write(self,vals): def write(self,vals):
if 'user_id' in vals:
user = self.user_id.id if self.user_id else False
user_change = ([(0,0,{
'user_id': user,
'user_second_id':vals['user_id']
})])
vals.update({'user_changes_ids':user_change})
if self.is_support == True or self.is_erp == True or self.is_emergency == True: if self.is_support == True or self.is_erp == True or self.is_emergency == True:
if "stage_id" in vals: if "stage_id" in vals:
if self.description == '<p><br></p>' or self.description==False: if self.description == '<p><br></p>' or self.description==False:
raise ValidationError (_("Para cambiar de etapa, es necesario agregar una descripción")) raise ValidationError (_("Para cambiar de etapa, es necesario agregar una descripción"))
...@@ -335,10 +345,15 @@ class HelpdeskTicket(models.Model): ...@@ -335,10 +345,15 @@ class HelpdeskTicket(models.Model):
if description-11 < min_description: if description-11 < min_description:
raise ValidationError (_("Favor de agregar al menos "+str(min_description)+" caracteres a la descripción")) raise ValidationError (_("Favor de agregar al menos "+str(min_description)+" caracteres a la descripción"))
return super(HelpdeskTicket, self).write(vals) return super(HelpdeskTicket, self).write(vals)
else: else:
return super(HelpdeskTicket, self).write(vals) return super(HelpdeskTicket, self).write(vals)
def action_approve(self): def action_approve(self):
if self.description == '<p><br></p>' or self.description==False: if self.description == '<p><br></p>' or self.description==False:
raise ValidationError (_("Para cambiar de etapa, es necesario agregar una descripción")) raise ValidationError (_("Para cambiar de etapa, es necesario agregar una descripción"))
......
...@@ -22,3 +22,20 @@ class ResUsers(models.Model): ...@@ -22,3 +22,20 @@ class ResUsers(models.Model):
#partner_id = fields.Many2one('res.partner',required=False, ) #partner_id = fields.Many2one('res.partner',required=False, )
@api.model
def create(self,vals):
res = super(ResUsers, self).create(vals)
if res.partner_id and not res.partner_id.email:
res.partner_id.sudo().write({
'email':res.user_ids[0].login
})
return res
def write(self,vals):
res = super(ResUsers, self).write(vals)
if self.partner_id and not self.partner_id.email:
self.sudo().write({
'email':res.user_ids[0].login
})
return res
\ No newline at end of file
...@@ -31,6 +31,217 @@ class TicketDashboardInherit(models.Model): ...@@ -31,6 +31,217 @@ class TicketDashboardInherit(models.Model):
users = self.env['res.users'].sudo().search_read(domain) users = self.env['res.users'].sudo().search_read(domain)
return users return users
def all_tickets_ids(self,team_leader,team,assign_user,filter_date,start_date,end_date):
doman = []
id_list = []
#uid = request.session.uid
#user = self.env['res.users'].sudo().browse(uid)
#cids = request.httprequest.cookies.get('cids', str(user.company_id.id))
#doman.append(('company_id','in',[cids]))
ticket_obj = self.env['helpdesk.ticket'].sudo().search(
[], order='id desc', limit=1)
_logger.info(filter_date)
if filter_date == 'today':
_logger.info('Entra today')
dt_flt1 = []
dt_flt1.append('create_date')
dt_flt1.append('>')
dt_flt1.append(datetime.now().date().strftime("%Y/%m/%d 00:00:00"))
doman.append(tuple(dt_flt1))
dt_flt2 = []
dt_flt2.append('create_date')
dt_flt2.append('<=')
dt_flt2.append(
datetime.now().date().strftime("%Y/%m/%d 23:59:59"))
doman.append(tuple(dt_flt2))
elif filter_date == 'yesterday':
dt_flt1 = []
dt_flt1.append('create_date')
dt_flt1.append('>')
prev_day = (datetime.now().date() -
relativedelta(days=1)).strftime('%Y/%m/%d 00:00:00')
dt_flt1.append(prev_day)
doman.append(tuple(dt_flt1))
dt_flt2 = []
dt_flt2.append('create_date')
dt_flt2.append('<=')
prev_day = (datetime.now().date() -
relativedelta(days=1)).strftime('%Y/%m/%d 23:59:59')
dt_flt2.append(prev_day)
doman.append(tuple(dt_flt2))
elif filter_date == 'weekly': # current week
dt_flt1 = []
dt_flt1.append('create_date')
dt_flt1.append('>')
dt_flt1.append((datetime.now().date(
) - relativedelta(weeks=1, weekday=0)).strftime("%Y/%m/%d 00:00:00"))
doman.append(tuple(dt_flt1))
dt_flt2 = []
dt_flt2.append('create_date')
dt_flt2.append('<=')
dt_flt2.append(
datetime.now().date().strftime("%Y/%m/%d 23:59:59"))
doman.append(tuple(dt_flt2))
elif filter_date == 'prev_week': # Previous week
dt_flt1 = []
dt_flt1.append('create_date')
dt_flt1.append('>')
dt_flt1.append((datetime.now().date(
) - relativedelta(weeks=2, weekday=0)).strftime("%Y/%m/%d 00:00:00"))
doman.append(tuple(dt_flt1))
dt_flt2 = []
dt_flt2.append('create_date')
dt_flt2.append('<=')
dt_flt2.append((datetime.now().date(
) - relativedelta(weeks=1, weekday=6)).strftime("%Y/%m/%d 23:59:59"))
doman.append(tuple(dt_flt2))
elif filter_date == 'monthly': # Current Month
dt_flt1 = []
dt_flt1.append('create_date')
dt_flt1.append('>')
dt_flt1.append(
(datetime.now().date()).strftime("%Y/%m/01 00:00:00"))
doman.append(tuple(dt_flt1))
dt_flt2 = []
dt_flt2.append('create_date')
dt_flt2.append('<=')
dt_flt2.append(
datetime.now().date().strftime("%Y/%m/%d 23:59:59"))
doman.append(tuple(dt_flt2))
elif filter_date == 'prev_month': # Previous Month
dt_flt1 = []
dt_flt1.append('create_date')
dt_flt1.append('>')
dt_flt1.append(
(datetime.now().date() - relativedelta(months=1)).strftime("%Y/%m/01 00:00:00"))
doman.append(tuple(dt_flt1))
dt_flt2 = []
dt_flt2.append('create_date')
dt_flt2.append('<')
dt_flt2.append(
datetime.now().date().strftime("%Y/%m/01 00:00:00"))
doman.append(tuple(dt_flt2))
elif filter_date == 'cur_year': # Current Year
dt_flt1 = []
dt_flt1.append('create_date')
dt_flt1.append('>')
dt_flt1.append(
(datetime.now().date()).strftime("%Y/01/01 00:00:00"))
doman.append(tuple(dt_flt1))
dt_flt2 = []
dt_flt2.append('create_date')
dt_flt2.append('<=')
dt_flt2.append(
datetime.now().date().strftime("%Y/%m/%d 23:59:59"))
doman.append(tuple(dt_flt2))
elif filter_date == 'prev_year': # Previous Year
dt_flt1 = []
dt_flt1.append('create_date')
dt_flt1.append('>')
dt_flt1.append(
(datetime.now().date() - relativedelta(years=1)).strftime("%Y/01/01 00:00:00"))
doman.append(tuple(dt_flt1))
dt_flt2 = []
dt_flt2.append('create_date')
dt_flt2.append('<')
dt_flt2.append(
datetime.now().date().strftime("%Y/01/01 00:00:00"))
doman.append(tuple(dt_flt2))
elif filter_date == 'custom':
if start_date and end_date:
dt_flt1 = []
dt_flt1.append('create_date')
dt_flt1.append('>=')
dt_flt1.append(datetime.strptime(
str(start_date), DEFAULT_SERVER_DATE_FORMAT).strftime("%Y/%m/%d"))
doman.append(tuple(dt_flt1))
dt_flt2 = []
dt_flt2.append('create_date')
dt_flt2.append('<=')
dt_flt2.append(datetime.strptime(
str(end_date), DEFAULT_SERVER_DATE_FORMAT).strftime("%Y/%m/%d"))
doman.append(tuple(dt_flt2))
if team and team not in [None,False,""] and int(team) != 0:
doman.append(('team_id', '=', int(team)))
if team_leader and team_leader not in [None,False,""] and int(team_leader) != 0:
doman.append(('team_head', '=', int(team_leader)))
if assign_user and assign_user not in [None,False,""] and int(assign_user) != 0:
doman.append(('|'))
doman.append(('|'))
doman.append(('user_id', '=', int(assign_user)))
doman.append(('sh_user_ids', 'in', [int(assign_user)]))
doman.append(('team_id.team_members','in',[self.env.user.id]))
elif assign_user and assign_user not in [None,False,""] and int(assign_user) == 0:
if self.env.user.has_group('helpdesk_morsa.ticket_team_admin') and not self.env.user.has_group('sh_all_in_one_helpdesk.helpdesk_group_manager'):
doman.append(('|'))
doman.append(('team_admin_id','=',self.env.user.id))
doman.append(('team_id.team_members','in',[self.env.user.id]))
elif self.env.user.has_group(
'sh_all_in_one_helpdesk.helpdesk_group_team_leader'
) and self.env.user.has_group(
'sh_all_in_one_helpdesk.helpdesk_group_user'
) and not self.env.user.has_group(
'sh_all_in_one_helpdesk.helpdesk_group_manager'
) and not self.env.user.has_group(
'helpdesk_morsa.ticket_team_admin'
):
doman.append(('|'))
doman.append(('|'))
doman.append(('sh_user_ids', 'in', [self.env.user.id]))
doman.append(('user_id', '=', self.env.user.id))
doman.append(('team_id.team_members','in',[self.env.user.id]))
elif not self.env.user.has_group(
'sh_all_in_one_helpdesk.helpdesk_group_team_leader'
) and self.env.user.has_group(
'sh_all_in_one_helpdesk.helpdesk_group_user'
) and not self.env.user.has_group(
'sh_all_in_one_helpdesk.helpdesk_group_manager'
):
doman.append(('|'))
doman.append(('user_id', '=', self.env.user.id))
doman.append(('sh_user_ids', 'in', [self.env.user.id]))
_logger.info(doman)
search_tickets = self.env['helpdesk.ticket'].sudo().search(doman)
if search_tickets:
id_list = search_tickets.ids
all_dict = {'TODOS': id_list}
return all_dict
@api.model @api.model
def get_ticket_counter_data(self,team_leader,team,assign_user,filter_date,start_date,end_date): def get_ticket_counter_data(self,team_leader,team,assign_user,filter_date,start_date,end_date):
data_dict = {} data_dict = {}
...@@ -44,6 +255,9 @@ class TicketDashboardInherit(models.Model): ...@@ -44,6 +255,9 @@ class TicketDashboardInherit(models.Model):
cids = [int(cid) for cid in cids.split(',')] cids = [int(cid) for cid in cids.split(',')]
company_id = self.env.company company_id = self.env.company
id_list = [] id_list = []
for stage in company_id.dashboard_filter: for stage in company_id.dashboard_filter:
doman = [] doman = []
id_list = [] id_list = []
...@@ -288,6 +502,7 @@ class TicketDashboardInherit(models.Model): ...@@ -288,6 +502,7 @@ class TicketDashboardInherit(models.Model):
'ticket_data_dic': ticket_data_dic, 'ticket_data_dic': ticket_data_dic,
'ticket_data_list': ticket_data_list, 'ticket_data_list': ticket_data_list,
'data_dict': data_dict, 'data_dict': data_dict,
'dict_all': self.all_tickets_ids(team_leader,team,assign_user,filter_date,start_date,end_date)
}) })
@api.model @api.model
......
from odoo import models, fields, api, _
from odoo.exceptions import UserError
class UserTicketAssign(models.Model):
_name = 'user.ticket.assign'
ticket_id = fields.Many2one('helpdesk.ticket','Ticket')
user_id = fields.Many2one('res.users','Usuario Anterior')
user_second_id = fields.Many2one('res.users','Usuario Actual')
...@@ -19,6 +19,7 @@ user_crm_lead,crm.lead.user,crm.model_crm_lead,sh_all_in_one_helpdesk.helpdesk_g ...@@ -19,6 +19,7 @@ user_crm_lead,crm.lead.user,crm.model_crm_lead,sh_all_in_one_helpdesk.helpdesk_g
user_purchase_order,purchase.order.user,purchase.model_purchase_order,sh_all_in_one_helpdesk.helpdesk_group_user,1,0,0,0 user_purchase_order,purchase.order.user,purchase.model_purchase_order,sh_all_in_one_helpdesk.helpdesk_group_user,1,0,0,0
user_sale_order,sale.order.user,sale.model_sale_order,sh_all_in_one_helpdesk.helpdesk_group_user,1,0,0,0 user_sale_order,sale.order.user,sale.model_sale_order,sh_all_in_one_helpdesk.helpdesk_group_user,1,0,0,0
access_user_ticket_assign,user.ticket.assign,model_user_ticket_assign,sh_all_in_one_helpdesk.helpdesk_group_user,1,1,1,1
auditor_helpdesk_ticket,helpdeks.ticket.auditor,sh_all_in_one_helpdesk.model_helpdesk_ticket,helpdesk_morsa.ticket_auditor,1,0,0,0 auditor_helpdesk_ticket,helpdeks.ticket.auditor,sh_all_in_one_helpdesk.model_helpdesk_ticket,helpdesk_morsa.ticket_auditor,1,0,0,0
auditor_helpdesk_category,helpdesk_category.auditor,sh_all_in_one_helpdesk.model_helpdesk_category,helpdesk_morsa.ticket_auditor,1,0,0,0 auditor_helpdesk_category,helpdesk_category.auditor,sh_all_in_one_helpdesk.model_helpdesk_category,helpdesk_morsa.ticket_auditor,1,0,0,0
......
...@@ -41,7 +41,7 @@ $(document).ready(function(e) { ...@@ -41,7 +41,7 @@ $(document).ready(function(e) {
var ticket_type = $("#tck_type").val(); var ticket_type = $("#tck_type").val();
if(ticket_type == 'soporte'){ if(ticket_type == 'soporte'){
var rqued = required_support(); var rqued = required_support();
ajax_unvalued_tickets(rqued); /*ajax_unvalued_tickets(rqued);*/
if (rqued['portal_contact_name'] == ""){ if (rqued['portal_contact_name'] == ""){
e.preventDefault(); e.preventDefault();
swal({ swal({
......
...@@ -18,4 +18,13 @@ ...@@ -18,4 +18,13 @@
.modal-content{ .modal-content{
max-height:650px !important; max-height:650px !important;
}
.o_form_statusbar{
position: fixed !important;
top: 190px;
left: 1;
width: 100%;
z-index: 1000;
} }
\ No newline at end of file
...@@ -7,52 +7,116 @@ ...@@ -7,52 +7,116 @@
<field name="inherit_id" ref="sh_all_in_one_helpdesk.helpdesk_ticket_form_view"/> <field name="inherit_id" ref="sh_all_in_one_helpdesk.helpdesk_ticket_form_view"/>
<field name="priority" eval="17"/> <field name="priority" eval="17"/>
<field name="arch" type="xml"> <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"/>
<field name="is_emergency" invisible="1"/>
</xpath>
<xpath expr="//field[@name='priority']" position="after">
<field name="system_id" attrs="{'invisible':[('is_support', '=', False),('is_erp', '=', False),('is_emergency', '=', False)]}"/>
<field name="erp_type" widget="radio" attrs="{'invisible':[('is_erp', '=', False)]}" options="{'horizontal': true}"/>
<field name="erp_id" attrs="{'invisible':[('is_erp', '=', False)]}"/>
<field name="warehouse_id" attrs="{'invisible':[('is_erp', '=', False)]}"/>
<field name="module_route" attrs="{'invisible':['|',('is_erp', '=', False),('erp_type','in',['mejora','reporte'])]}"/>
<field name="process_text" attrs="{'invisible':['|',('is_erp', '=', False),('erp_type','in',['mejora','reporte'])]}"/>
<field name="required_validation" attrs="{'invisible':['|',('is_erp', '=', False),('erp_type','in',['mejora','reporte'])]}"/>
<field name="common_scenery" attrs="{'invisible':['|',('is_erp', '=', False),('erp_type','in',['mejora','reporte'])]}"/>
<field name="module_impact" attrs="{'invisible':['|', ('is_erp', '=', False),('erp_type','in',['mejora','reporte'])]}"/>
<field name="incidence_type" attrs="{'invisible':[('is_emergency', '=', False)]}"/>
</xpath>
<xpath expr="//header" position="replace"> <xpath expr="//header" position="replace">
<header> <header>
<button name="assign_me" type="object" string="Assignar a mi" class="oe_highlight"/> <button name="assign_me" type="object" string="Assignar a mi" class="oe_highlight"/>
<button name="action_approve" type="object" string="Siguiente etapa" class="oe_highlight" attrs="{'invisible':['|','|',('cancel_stage_boolean','=',True),('done_stage_boolean','=',True),('closed_stage_boolean','=',True)]}"/> <button name="action_approve" type="object" string="Siguiente etapa" class="oe_highlight" attrs="{'invisible':['|','|',('cancel_stage_boolean','=',True),('done_stage_boolean','=',True),('closed_stage_boolean','=',True)]}"/>
<button name="action_reply" type="object" string="Respuesta" class="oe_highlight" attrs="{'invisible':[('open_boolean','=',True)]}"/> <button name="action_reply" type="object" string="Respuesta" class="oe_highlight" attrs="{'invisible':[('open_boolean','=',True)]}"/>
<button name="action_done" type="object" string="Resolver Ticket" class="oe_highlight" attrs="{'invisible':['|',('done_button_boolean','=',True),('open_boolean','=',True)]}"/> <button name="action_done" type="object" string="Resolver Ticket" class="oe_highlight" attrs="{'invisible':['|',('done_button_boolean','=',True),('open_boolean','=',True)]}"/>
<button name="action_closed" type="object" string="Cerrar Ticket" class="oe_highlight" attrs="{'invisible':['|',('done_stage_boolean','=',False),('open_boolean','=',True)]}"/> <button name="action_closed" type="object" string="Cerrar Ticket" class="oe_highlight" attrs="{'invisible':['|',('done_stage_boolean','=',False),('open_boolean','=',False)]}"/>
<button name="action_cancel" type="object" string="Cancelar Ticket" class="oe_highlight" attrs="{'invisible':[('cancel_button_boolean','=',False)]}"/> <button name="action_cancel" type="object" string="Cancelar Ticket" class="oe_highlight" attrs="{'invisible':[('cancel_button_boolean','=',False)]}"/>
<button name="action_open" type="object" string="Re-Abrir Ticket" class="oe_highlight" attrs="{'invisible':[('open_boolean','=',False)]}"/> <button name="action_open" type="object" string="Re-Abrir Ticket" class="oe_highlight" attrs="{'invisible':[('open_boolean','=',False)]}"/>
<button name="preview_ticket" type="object" string="Vista previa"/> <button name="preview_ticket" type="object" string="Vista previa"/>
<field name="stage_id" widget="statusbar"/> <field name="stage_id" widget="statusbar"/>
</header> </header>
</xpath> </xpath>
<xpath expr="//field[@name='tag_ids']" position="attributes">
<attribute name="invisible">1</attribute>
<xpath expr="//div[@class='oe_title']" position="replace">
<h1><field name="name" readonly="1"/></h1>
<field name="active" invisible="1"/>
<field name="category_bool" invisible="1"/>
<field name="sub_category_bool" invisible="1"/>
<field name="rating_bool" invisible="1"/>
<field name="sh_status_boolean" invisible="1"/>
<field name="done_stage_boolean" invisible="1"/>
<field name="cancel_stage_boolean" invisible="1"/>
<field name="closed_stage_boolean" invisible="1"/>
<field name="ticket_from_website" invisible="1"/>
<field name="ticket_from_portal" invisible="1"/>
<field name="reopen_stage_boolean" invisible="1"/>
<field name="cancel_button_boolean" invisible="1"/>
<field name="done_button_boolean" invisible="1"/>
<field name="open_boolean" invisible="1"/>
<field name="sh_days_to_reach" invisible="1"/>
<field name="sh_days_to_late" invisible="1"/>
<field name="sh_ticket_report_url" invisible="1"/>
<field name="portal_ticket_url_wp" invisible="1"/>
<field name="state" invisible="1"/>
<field name="is_support" invisible="1"/>
<field name="is_erp" invisible="1"/>
<field name="is_emergency" invisible="1"/>
<field name="team_members" widget="many2manytags" invisible="1"/>
<label for="description"/>
<h3><field name="description" placeholder="Descripción"/></h3>
<label for="descripcion_solution"/>
<h3><field name="descripcion_solution" placeholder="Descripción"/></h3>
</xpath> </xpath>
<xpath expr="//group[1]" position="replace"></xpath>
<xpath expr="//field[@name='subject_id']" position="attributes"> <xpath expr="//page[1]" position="replace">
<attribute name="invisible">1</attribute> <page string="Información General">
<group>
<group>
<field name="ticket_type"/>
<field name="team_id" invisible="1"/>
<field name="team_head" invisible="1"/>
<field name="team_admin_id" invisible="1"/>
<field name="category_id"/>
<field name="priority"/>
<field name="ticket_reason"/>
<field name="incidence_type" attrs="{'invisible':[('is_emergency', '=', False)]}"/>
<field name="erp_type" widget="radio" attrs="{'invisible':[('is_erp', '=', False)]}" options="{'horizontal': true}"/>
<field name="erp_id" attrs="{'invisible':[('is_erp', '=', False)]}"/>
<field name="warehouse_id" attrs="{'invisible':[('is_erp', '=', False)]}"/>
</group>
<group>
<field name="tag_ids" invisible="1"/>
<field name="subject_id" invisible="1"/>
<field name="sub_category_id" invisible="1"/>
<field name="partner_id"/>
<field name="user_branch_id"/>
<field name="user_region_id"/>
<field name="mobile_no"/>
<field name="person_name" invisible="1"/>
<field name="email" invisible="1"/>
<field name="system_id" attrs="{'invisible':[('is_support', '=', False),('is_erp', '=', False),('is_emergency', '=', False)]}"/>
<field name="module_route" attrs="{'invisible':['|',('is_erp', '=', False),('erp_type','not in',['mejora','reporte'])]}"/>
<field name="process_text" attrs="{'invisible':['|',('is_erp', '=', False),('erp_type','not in',['mejora','reporte'])]}"/>
<field name="required_validation" attrs="{'invisible':['|',('is_erp', '=', False),('erp_type','not in',['mejora','reporte'])]}"/>
<field name="common_scenery" attrs="{'invisible':['|',('is_erp', '=', False),('erp_type','not in',['mejora','reporte'])]}"/>
<field name="module_impact" attrs="{'invisible':['|',('is_erp', '=', False),('erp_type','not in',['mejora','reporte'])]}"/>
</group>
</group>
</page>
</xpath> </xpath>
<xpath expr="//field[@name='customer_comment']" position="before"> <xpath expr="//field[@name='customer_comment']" position="before">
<field name="problem_solved_on_time" readonly="1"/> <field name="problem_solved_on_time" readonly="1"/>
<field name="good_service_actitude" readonly="1"/> <field name="good_service_actitude" readonly="1"/>
<field name="begin_before_ten_min" readonly="1"/> <field name="begin_before_ten_min" readonly="1"/>
</xpath> </xpath>
<xpath expr="//field[@name='sub_category_id']" position="after">
<xpath expr="//page[5]" position="inside">
<group>
<group string="Fechas de Movimientos">
<field name="create_date"/>
<field name="write_date"/>
<field name="sh_due_date"/>
<field name="replied_date"/>
</group>
<group string="SLA INFO">
<field name="sh_sla_deadline" attrs="{'invisible':[('sh_sla_deadline','=',False)]}"/>
<field name="sh_sla_policy_ids" invisible="1"/>
<field name="sh_ticket_alarm_ids" widget="many2many_tags"/>
</group>
</group>
</xpath>
<!--<xpath expr="//field[@name='sub_category_id']" position="after">
<field name="ticket_reason" attrs="{'invisible':['|','|',('is_support', '=', True),('is_erp','=',False),('is_emergency','=',False)]}"/> <field name="ticket_reason" attrs="{'invisible':['|','|',('is_support', '=', True),('is_erp','=',False),('is_emergency','=',False)]}"/>
</xpath> </xpath>
<xpath expr="//field[@name='partner_id']" position="after"> <xpath expr="//field[@name='partner_id']" position="after">
...@@ -73,6 +137,17 @@ ...@@ -73,6 +137,17 @@
<xpath expr="//field[@name='customer_comment']" position="attributes"> <xpath expr="//field[@name='customer_comment']" position="attributes">
<attribute name="readonly">1</attribute> <attribute name="readonly">1</attribute>
<attribute name="force_save">1</attribute> <attribute name="force_save">1</attribute>
</xpath>-->
<xpath expr="//notebook" position="inside">
<page string="Movimiento de usuarios">
<field name="user_changes_ids">
<tree>
<field name="create_date"/>
<field name="user_id"/>
<field name="user_second_id"/>
</tree>
</field>
</page>
</xpath> </xpath>
</field> </field>
</record> </record>
...@@ -138,7 +213,6 @@ ...@@ -138,7 +213,6 @@
<field name="incidence_type"/> <field name="incidence_type"/>
<field name="warehouse_id"/> <field name="warehouse_id"/>
<field name="call_before_10"/> <field name="call_before_10"/>
</field> </field>
<xpath expr="//div[@t-attf-class='#{kanban_color(record.color.raw_value)} oe_kanban_global_click']" position="attributes"> <xpath expr="//div[@t-attf-class='#{kanban_color(record.color.raw_value)} oe_kanban_global_click']" position="attributes">
...@@ -150,12 +224,24 @@ ...@@ -150,12 +224,24 @@
<attribute name="style"></attribute> <attribute name="style"></attribute>
</t> </t>
</xpath> </xpath>
</field> </field>
</record> </record>
<record id="helpdesk_ticket_kanban_replace_button" model="ir.ui.view">
<field name="name">helpdesk.ticket.kanban.replace.button</field>
<field name="model">helpdesk.ticket</field>
<field name="inherit_id" ref="sh_all_in_one_helpdesk.sh_helpdesk_ticket_time_inherit_kanban_view" />
<field name="arch" type="xml">
<xpath expr="//button[@name='action_ticket_start']" position="replace">
<button name="assign_me" type="object" string="Asignarme" class="btn-primary">Asignarme</button>
</xpath>
<xpath expr="//button[@name='action_ticket_end']" position="replace">
</xpath>
</field>
</record>
<record id="quick_create_helpdesk_ticket" model="ir.ui.view"> <record id="quick_create_helpdesk_ticket" model="ir.ui.view">
<field name="name">helpdesk.ticket.quick_create</field> <field name="name">helpdesk.ticket.quick_create</field>
...@@ -178,5 +264,29 @@ ...@@ -178,5 +264,29 @@
</field> </field>
</record> </record>
<record id="helpdesk_ticket_inherit_tree_hide" model="ir.ui.view">
<field name="name">helpdesk.ticket.tree.inherit</field>
<field name="model">helpdesk.ticket</field>
<field name="inherit_id" ref="sh_all_in_one_helpdesk.helpdesk_ticket_tree_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='team_id']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='team_head']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='subject_id']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='sub_category_id']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='category_id']" position="after">
<field name="description"/>
</xpath>
</field>
</record>
</data> </data>
</odoo> </odoo>
\ No newline at end of file
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