Commit 595c5dd5 by Arturo Jasso Origel

se retiro la condición para evitar que lleguen correos dobles al área de sorporte

se cambio la manera en la que muestran los adjuntos, al dar click se descarga la imagne,
se retiraron fechas de cerrado y cancelado al menos que contengan información,
se coloco la descripción de solución como obligatoira cuando se encuentre en la etapa en proceso
se retiro el apartado de descargar en el portal,
se crearon los equipos de soporte 2do y 3er nivel
se creo el equipo de compras de activo
cuando se cambia el ticket a compras activo deja al usuario como vacio
botón asignarme manda alerta de si el ticket tiene un usuario asignado
se retiro el cliente responde/personal responde por el usuario asignado en el ticket
se agrego en soporte el filtro de tickets de 2do, 3er nivel y compras activo para muestra de ticket
compras activo manda check de require configuración, si el check esta habilitado cuando se le da click en cerrar, el ticket pasa soporte en caso contrario solo cierra el ticket
cuando el ticket cambia de equipo entre soporte, erp y 911 cambia el nombre del ticket
parent 2646e526
from . import models from . import models
from . import controllers from . import controllers
from . import wizard
\ No newline at end of file
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
"version":"15.0.34", "version":"15.0.34",
"depends": [ "depends": [
"base", "base",
"web",
"portal_design_helpdesk", "portal_design_helpdesk",
"sh_all_in_one_helpdesk", "sh_all_in_one_helpdesk",
"vista_backend_theme", "vista_backend_theme",
...@@ -26,6 +27,7 @@ ...@@ -26,6 +27,7 @@
'data/region.xml', 'data/region.xml',
'data/helpdesk_team.xml', 'data/helpdesk_team.xml',
'data/helpdesk_stage.xml', 'data/helpdesk_stage.xml',
'data/helpdesk_team_level.xml',
'data/sla_policies.xml', 'data/sla_policies.xml',
'data/modules.xml', 'data/modules.xml',
'data/warehouses.xml', 'data/warehouses.xml',
...@@ -45,10 +47,12 @@ ...@@ -45,10 +47,12 @@
'views/odoo/helpdesk_module.xml', 'views/odoo/helpdesk_module.xml',
'views/odoo/helpdesk_reason.xml', 'views/odoo/helpdesk_reason.xml',
'views/odoo/res_users.xml', 'views/odoo/res_users.xml',
'wizard/change_ticket_.xml',
], ],
'assets': { 'assets': {
'web.assets_backend': [ 'web.assets_backend': [
'/helpdesk_morsa/static/src/scss/backend.scss' '/helpdesk_morsa/static/src/scss/backend.scss',
], ],
'web.assets_frontend': [ 'web.assets_frontend': [
'/helpdesk_morsa/static/src/scss/portal.scss', '/helpdesk_morsa/static/src/scss/portal.scss',
......
...@@ -70,28 +70,21 @@ class WebsiteTickets(DownloadReport): ...@@ -70,28 +70,21 @@ class WebsiteTickets(DownloadReport):
}) })
ticket = request.env['helpdesk.ticket'].sudo().search( ticket = request.env['helpdesk.ticket'].sudo().search(
[('id', '=', int(ticket_id))], limit=1) [('id', '=', int(ticket_id))], limit=1)
_logger.info('ticket')
unvalued = False unvalued = False
if kw.get('portal_unvalued'): if kw.get('portal_unvalued'):
unvalued = kw.get('portal_unvalued') unvalued = kw.get('portal_unvalued')
_logger.info(unvalued)
if ticket and unvalued == 'all': if ticket and unvalued == 'all':
_logger.info('Entra tickets')
tickets = request.env['helpdesk.ticket'].sudo().search([ tickets = request.env['helpdesk.ticket'].sudo().search([
('partner_id','=',ticket.partner_id.id), ('partner_id','=',ticket.partner_id.id),
('stage_id','=',ticket.stage_id.id), ('stage_id','=',ticket.stage_id.id),
('team_id','=',ticket.team_id.id) ('team_id','=',ticket.team_id.id)
]) ])
_logger.info(tickets)
if tickets: if tickets:
_logger.info('Entra tickets')
for t in tickets: for t in tickets:
t.sudo().write(dic) t.sudo().write(dic)
else: else:
_logger.info('Entra ticket')
ticket.sudo().write(dic) ticket.sudo().write(dic)
elif ticket and not unvalued: elif ticket and not unvalued:
_logger.info('Entra ticket')
ticket.sudo().write(dic) ticket.sudo().write(dic)
elif ticket: elif ticket:
ticket.sudo().write(dic) ticket.sudo().write(dic)
......
...@@ -64,7 +64,6 @@ class PortalHelpdeskMorsa(PortalHelpdesk): ...@@ -64,7 +64,6 @@ class PortalHelpdeskMorsa(PortalHelpdesk):
('stage_id','=',request.env.ref('sh_all_in_one_helpdesk.close_stage').id), ('stage_id','=',request.env.ref('sh_all_in_one_helpdesk.close_stage').id),
('priority_new','=',False)]) ('priority_new','=',False)])
_logger.info(unvalued_tickets)
if len(unvalued_tickets) >= 3: if len(unvalued_tickets) >= 3:
unvalued = [] unvalued = []
......
...@@ -79,7 +79,13 @@ class PortalHelpdeskMorsaSoporte(PortalHelpdesk): ...@@ -79,7 +79,13 @@ class PortalHelpdeskMorsaSoporte(PortalHelpdesk):
return values return values
def prepare_technial_support(self): def prepare_technial_support(self):
domain = [('team_id.id','=',request.env.ref('helpdesk_morsa.techinnical_support').id)] support = request.env.ref('helpdesk_morsa.techinnical_support').id
support_second = request.env.ref('helpdesk_morsa.support_second_level').id
support_third = request.env.ref('helpdesk_morsa.support_third_level').id
purchases = request.env.ref('helpdesk_morsa.purchase_actives').id
domain = [('team_id.id','in',[support,support_second,support_third,purchases])]
return domain return domain
......
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="support_second_level" model="helpdesk.team">
<field name="name">SOPORTE TÉCNICO 2do NIVEL</field>
<field name="short_name">SOP2</field>
<field name="team_head" ref="base.user_admin"/>
<field name="is_support_team" eval="True"/>
<field name="sh_resource_calendar_id" ref="resource.resource_calendar_std"/>
</record>
<record id="support_third_level" model="helpdesk.team">
<field name="name">SOPORTE TÉCNICO 3er NIVEL</field>
<field name="short_name">SOP3</field>
<field name="team_head" ref="base.user_admin"/>
<field name="is_support_team" eval="True"/>
<field name="sh_resource_calendar_id" ref="resource.resource_calendar_std"/>
</record>
<record id="purchase_actives" model="helpdesk.team">
<field name="name">COMPRAS ACTIVO</field>
<field name="short_name">COMP</field>
<field name="team_head" ref="base.user_admin"/>
<field name="sh_resource_calendar_id" ref="resource.resource_calendar_std"/>
</record>
</data>
</odoo>
\ No newline at end of file
from odoo import models, fields, api, _, SUPERUSER_ID import uuid
import pytz
import logging
import random import random
from odoo import models, fields, api, _, SUPERUSER_ID
from datetime import datetime, timedelta from datetime import datetime, timedelta
from odoo.tools import email_re, email_escape_char, email_split from odoo.tools import email_re, email_escape_char, email_split
from odoo.exceptions import UserError,ValidationError from odoo.exceptions import UserError,ValidationError
from odoo.tools import email_re from odoo.tools import email_re
import uuid from odoo.http import request
import pytz
import logging
_logger = logging.getLogger(__name__) _logger = logging.getLogger(__name__)
...@@ -53,6 +56,10 @@ class HelpdeskTicket(models.Model): ...@@ -53,6 +56,10 @@ class HelpdeskTicket(models.Model):
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") user_changes_ids = fields.One2many('user.ticket.assign', 'ticket_id',string="Cambio de usuario")
descripcion_solution = fields.Text('Descripción de solución') descripcion_solution = fields.Text('Descripción de solución')
in_proggres_stage = fields.Boolean('Etapa en progreso',compute='_compute_progess_stage')
is_purchase = fields.Boolean('Es compra',compute='_compute_ticket_type')
requires_configuration = fields.Boolean('Require configuración')
support_description = fields.Char('Descripción de problema')
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
...@@ -77,10 +84,23 @@ class HelpdeskTicket(models.Model): ...@@ -77,10 +84,23 @@ class HelpdeskTicket(models.Model):
rec.color = 10 rec.color = 10
@api.onchange('support_description')
def onchange_description_information(self):
self.description = self.support_description
@api.depends('stage_id')
def _compute_progess_stage(self):
for rec in self:
if rec.stage_id.id == self.env.ref('sh_all_in_one_helpdesk.in_progress_stage').id:
rec.in_proggres_stage = True
else:
rec.in_proggres_stage = False
@api.depends('team_id') @api.depends('team_id')
def _compute_ticket_type(self): def _compute_ticket_type(self):
for ticket in self: for ticket in self:
if ticket.team_id.id == self.env.ref('helpdesk_morsa.techinnical_support').id: if ticket.team_id.id in [self.env.ref('helpdesk_morsa.techinnical_support').id, self.env.ref('helpdesk_morsa.support_second_level').id, self.env.ref('helpdesk_morsa.support_third_level').id]:
ticket.is_support = True ticket.is_support = True
else: else:
ticket.is_support = False ticket.is_support = False
...@@ -95,24 +115,23 @@ class HelpdeskTicket(models.Model): ...@@ -95,24 +115,23 @@ class HelpdeskTicket(models.Model):
else: else:
ticket.is_emergency = False ticket.is_emergency = False
def assign_me(self): if ticket.team_id.id == self.env.ref('helpdesk_morsa.purchase_actives').id:
self.user_id = self.env.user.id ticket.is_purchase = True
else:
ticket.is_purchase = False
@api.onchange('team_id') def assign_me(self):
def onchange_ticket_type(self): self.user_id = self.env.user.id
if self.team_id and not self.ticket_type:
self.ticket_type = self.team_id.helpdesk_ticket_type_id.id
elif self.team_id and self.ticket_type:
self.ticket_type = self.team_id.helpdesk_ticket_type_id.id
@api.onchange('ticket_type') @api.onchange('ticket_type')
def onchange_ticket_team(self): def onchange_ticket_team(self):
if self.ticket_type and not self.team_id: if self.ticket_type:
self.team_id = self.env['helpdesk.team'].search([('helpdesk_ticket_type_id','=',self.ticket_type.id)]).id team = self.env['helpdesk.team'].sudo().search([('helpdesk_ticket_type_id','=',self.ticket_type.id)]).id
elif self.team_id and self.ticket_type: self.team_id = team
self.team_id = self.env['helpdesk.team'].search([('helpdesk_ticket_type_id','=',self.ticket_type.id)]).id if team == self.env.ref('helpdesk_morsa.purchase_actives').id:
if self.user_id:
self.user_id = False
@api.onchange('partner_id') @api.onchange('partner_id')
def onchange_partner_simple_info(self): def onchange_partner_simple_info(self):
...@@ -126,7 +145,12 @@ class HelpdeskTicket(models.Model): ...@@ -126,7 +145,12 @@ class HelpdeskTicket(models.Model):
def _compute_access_url(self): def _compute_access_url(self):
super(HelpdeskTicket, self)._compute_access_url() super(HelpdeskTicket, self)._compute_access_url()
for ticket in self: for ticket in self:
if ticket.team_id.id == self.env.ref('helpdesk_morsa.techinnical_support').id: if ticket.team_id.id in [
self.env.ref('helpdesk_morsa.techinnical_support').id,
self.env.ref('helpdesk_morsa.support_second_level').id,
self.env.ref('helpdesk_morsa.support_third_level').id,
self.env.ref('helpdesk_morsa.purchase_actives').id
]:
ticket.access_url = '/my/soporte/%s' % (ticket.id) ticket.access_url = '/my/soporte/%s' % (ticket.id)
elif ticket.team_id.id == self.env.ref('helpdesk_morsa.erp_asistense').id: elif ticket.team_id.id == self.env.ref('helpdesk_morsa.erp_asistense').id:
ticket.access_url = '/my/erp/%s' % (ticket.id) ticket.access_url = '/my/erp/%s' % (ticket.id)
...@@ -252,19 +276,15 @@ class HelpdeskTicket(models.Model): ...@@ -252,19 +276,15 @@ class HelpdeskTicket(models.Model):
res.ticket_allocated = True res.ticket_allocated = True
elif not res.team_id and not res.team_head and res.user_id and res.sh_user_ids: elif not res.team_id and not res.team_head and res.user_id and res.sh_user_ids:
_logger.info('Entra15')
allocation_template = res.company_id.allocation_mail_template_id allocation_template = res.company_id.allocation_mail_template_id
email_formatted = [] email_formatted = []
if res.user_id.partner_id.email_formatted not in email_formatted: if res.user_id.partner_id.email_formatted not in email_formatted:
_logger.info('Entra17')
email_formatted.append(res.user_id.partner_id.email_formatted) email_formatted.append(res.user_id.partner_id.email_formatted)
for user in res.sh_user_ids: for user in res.sh_user_ids:
if user.id != res.user_id.id: if user.id != res.user_id.id:
_logger.info('Entra18')
if user.partner_id.email_formatted not in email_formatted: if user.partner_id.email_formatted not in email_formatted:
_logger.info('Entra19')
email_formatted.append(user.partner_id.email_formatted) email_formatted.append(user.partner_id.email_formatted)
email_formatted_str = ','.join(email_formatted) email_formatted_str = ','.join(email_formatted)
email_values = { email_values = {
...@@ -336,6 +356,29 @@ class HelpdeskTicket(models.Model): ...@@ -336,6 +356,29 @@ class HelpdeskTicket(models.Model):
'sh_sla_policy_ids':[(6,0,sla)] 'sh_sla_policy_ids':[(6,0,sla)]
}) })
def action_done(self):
if not self.descripcion_solution and self.is_support:
raise ValidationError(_("Para marcar como hecho es necesario llenar el campo Descripción de solución"))
return super(HelpdeskTicket, self).action_done()
def change_ticket_team(self):
purchases = self.env.ref('helpdesk_morsa.purchase_actives').sudo()
support = self.env.ref('helpdesk_morsa.techinnical_support').sudo()
if self.team_id.id == purchases.id and self.requires_configuration == True:
self.sudo().update({
'ticket_type': support.helpdesk_ticket_type_id.id,
'team_id': support.id,
'user_id': False,
})
action = self.env.ref('sh_all_in_one_helpdesk.sh_action_ticket_dashboard').sudo().read()[0]
return {'type': 'ir.actions.client', 'tag': action['tag']}
else:
return self.action_done()
def write(self,vals): def write(self,vals):
if 'user_id' in vals: if 'user_id' in vals:
user = self.user_id.id if self.user_id else False user = self.user_id.id if self.user_id else False
...@@ -344,12 +387,21 @@ class HelpdeskTicket(models.Model): ...@@ -344,12 +387,21 @@ class HelpdeskTicket(models.Model):
'user_second_id':vals['user_id'] 'user_second_id':vals['user_id']
})]) })])
vals.update({'user_changes_ids':user_change}) vals.update({'user_changes_ids':user_change})
if 'team_id' in vals:
if self.team_id.id != vals['team_id']:
if vals['team_id'] in [self.env.ref('helpdesk_morsa.techinnical_support').id,
self.env.ref('helpdesk_morsa.erp_asistense').id,
self.env.ref('helpdesk_morsa.ti_emergency').id]:
vals.update({'name': self.env['ir.sequence'].sudo().next_by_code('helpdesk.ticket.'+str(vals['team_id']) or _('New'))})
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"))
if vals['stage_id'] == self.env.ref('sh_all_in_one_helpdesk.done_stage').id:
if self.descripcion_solution or 'descripcion_solution' in vals :
pass
else:
raise ValidationError(_("Para marcar como hecho es necesario llenar el campo Descripción de solución"))
if 'description' in vals and vals["description"] != "" and self.description != False and vals['description'] != '<p><br></p>': if 'description' in vals and vals["description"] != "" and self.description != False and vals['description'] != '<p><br></p>':
min_description = int(self.env['ir.config_parameter'].sudo().get_param('helpdesk_morsa.description_min_lenght')) min_description = int(self.env['ir.config_parameter'].sudo().get_param('helpdesk_morsa.description_min_lenght'))
description = self.get_description_len(vals["description"]) description = self.get_description_len(vals["description"])
...@@ -362,15 +414,14 @@ class HelpdeskTicket(models.Model): ...@@ -362,15 +414,14 @@ class HelpdeskTicket(models.Model):
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"))
else: else:
return super(HelpdeskTicket, self).action_approve() return super(HelpdeskTicket, self).action_approve()
def get_description_len(self,description): def get_description_len(self,description):
try: try:
return len(description) return len(description)
...@@ -378,5 +429,20 @@ class HelpdeskTicket(models.Model): ...@@ -378,5 +429,20 @@ class HelpdeskTicket(models.Model):
return 0 return 0
def open_form_change_user(self):
if self.user_id:
wizard = self.env['change.ticket.user'].sudo().create({'ticket_id':self.id})
return {
'name': 'Cambiar usuario',
'type': 'ir.actions.act_window',
'view_type':'form',
'view_mode':'form',
'res_model':'change.ticket.user',
'res_id': wizard.id,
'target':'new',
}
else:
self.assign_me()
...@@ -5,8 +5,9 @@ from datetime import datetime ...@@ -5,8 +5,9 @@ from datetime import datetime
from dateutil.relativedelta import relativedelta from dateutil.relativedelta import relativedelta
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT from odoo.tools import DEFAULT_SERVER_DATE_FORMAT
import json import json
import logging import logging
import pytz
_logger = logging.getLogger(__name__) _logger = logging.getLogger(__name__)
...@@ -40,9 +41,7 @@ class TicketDashboardInherit(models.Model): ...@@ -40,9 +41,7 @@ class TicketDashboardInherit(models.Model):
#doman.append(('company_id','in',[cids])) #doman.append(('company_id','in',[cids]))
ticket_obj = self.env['helpdesk.ticket'].sudo().search( ticket_obj = self.env['helpdesk.ticket'].sudo().search(
[], order='id desc', limit=1) [], order='id desc', limit=1)
_logger.info(filter_date)
if filter_date == 'today': if filter_date == 'today':
_logger.info('Entra today')
dt_flt1 = [] dt_flt1 = []
dt_flt1.append('create_date') dt_flt1.append('create_date')
dt_flt1.append('>') dt_flt1.append('>')
...@@ -231,8 +230,6 @@ class TicketDashboardInherit(models.Model): ...@@ -231,8 +230,6 @@ class TicketDashboardInherit(models.Model):
doman.append(('user_id', '=', self.env.user.id)) doman.append(('user_id', '=', self.env.user.id))
doman.append(('sh_user_ids', 'in', [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) search_tickets = self.env['helpdesk.ticket'].sudo().search(doman)
if search_tickets: if search_tickets:
...@@ -752,8 +749,8 @@ class TicketDashboardInherit(models.Model): ...@@ -752,8 +749,8 @@ class TicketDashboardInherit(models.Model):
if search_tickets: if search_tickets:
for ticket in search_tickets: for ticket in search_tickets:
create_date = datetime.strftime(ticket.create_date,"%Y-%m-%d %H:%M:%S") create_date = datetime.strftime(self.convert_dt_utc(ticket.create_date),"%Y-%m-%d %H:%M:%S")
write_date = datetime.strftime(ticket.write_date,"%Y-%m-%d %H:%M:%S") write_date = datetime.strftime(self.convert_dt_utc(ticket.write_date),"%Y-%m-%d %H:%M:%S")
ticket_dic = { ticket_dic = {
'ticket_id': ticket.id, 'ticket_id': ticket.id,
'ticket_no': ticket.name, 'ticket_no': ticket.name,
...@@ -774,3 +771,15 @@ class TicketDashboardInherit(models.Model): ...@@ -774,3 +771,15 @@ 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,
}) })
def convert_dt_utc(self,date):
local = pytz.timezone(self.env.user.tz or pytz.utc)
date_convert = date.astimezone(local)
return date_convert
\ No newline at end of file
...@@ -5,13 +5,13 @@ admin_erp_modules,erp.modules.admin,model_erp_modules,sh_all_in_one_helpdesk.hel ...@@ -5,13 +5,13 @@ admin_erp_modules,erp.modules.admin,model_erp_modules,sh_all_in_one_helpdesk.hel
user_warehouse_helpdesk,warehouse.helpdesk_user,model_warehouse_helpdesk,base.group_user,1,0,0,0 user_warehouse_helpdesk,warehouse.helpdesk_user,model_warehouse_helpdesk,base.group_user,1,0,0,0
hlp_warehouse_helpdesk,warehouse.helpdesk.admin,model_warehouse_helpdesk,sh_all_in_one_helpdesk.helpdesk_group_manager,1,1,1,1 hlp_warehouse_helpdesk,warehouse.helpdesk.admin,model_warehouse_helpdesk,sh_all_in_one_helpdesk.helpdesk_group_manager,1,1,1,1
user_ticket_reason,ticket.reason.user,model_ticket_reason,base.group_user,,1,0,0,0 user_ticket_reason,ticket.reason.user,model_ticket_reason,base.group_user,1,1,0,0
admin_ticket_reason,ticket.reason.admin,model_ticket_reason,sh_all_in_one_helpdesk.helpdesk_group_manager,1,1,1,1 admin_ticket_reason,ticket.reason.admin,model_ticket_reason,sh_all_in_one_helpdesk.helpdesk_group_manager,1,1,1,1
user_region_helpdesk,region.helpdesk.user,model_region_helpdesk,base.group_user,,1,0,0,0 user_region_helpdesk,region.helpdesk.user,model_region_helpdesk,base.group_user,1,1,0,0
admin_region_helpdesk,region.helpdesk.admin,model_region_helpdesk,sh_all_in_one_helpdesk.helpdesk_group_manager,1,1,1,1 admin_region_helpdesk,region.helpdesk.admin,model_region_helpdesk,sh_all_in_one_helpdesk.helpdesk_group_manager,1,1,1,1
user_erp_system,erp.system.user,model_erp_system,base.group_user,,1,0,0,0 user_erp_system,erp.system.user,model_erp_system,base.group_user,1,0,0,0
admin_erp_system,erp.system.admin,model_erp_system,sh_all_in_one_helpdesk.helpdesk_group_manager,1,1,1,1 admin_erp_system,erp.system.admin,model_erp_system,sh_all_in_one_helpdesk.helpdesk_group_manager,1,1,1,1
user_account_move,account.move.user,account.model_account_move,sh_all_in_one_helpdesk.helpdesk_group_user,1,0,0,0 user_account_move,account.move.user,account.model_account_move,sh_all_in_one_helpdesk.helpdesk_group_user,1,0,0,0
...@@ -21,6 +21,8 @@ user_sale_order,sale.order.user,sale.model_sale_order,sh_all_in_one_helpdesk.hel ...@@ -21,6 +21,8 @@ user_sale_order,sale.order.user,sale.model_sale_order,sh_all_in_one_helpdesk.hel
access_user_ticket_assign,user.ticket.assign,model_user_ticket_assign,sh_all_in_one_helpdesk.helpdesk_group_user,1,1,1,1 access_user_ticket_assign,user.ticket.assign,model_user_ticket_assign,sh_all_in_one_helpdesk.helpdesk_group_user,1,1,1,1
access_change_ticket_user,change.ticket.user,model_change_ticket_user,base.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
auditor_helpdesk_team,helpdeks.team.auditor,sh_all_in_one_helpdesk.model_helpdesk_team,helpdesk_morsa.ticket_auditor,1,0,0,0 auditor_helpdesk_team,helpdeks.team.auditor,sh_all_in_one_helpdesk.model_helpdesk_team,helpdesk_morsa.ticket_auditor,1,0,0,0
......
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
<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),('is_purchase','=',True)]}"/>
<button name="change_ticket_team" type="object" string="Resolver Ticket" class="oe_highlight" attrs="{'invisible':[('is_purchase','=',False)]}"/>
<button name="action_closed" type="object" string="Cerrar Ticket" class="oe_highlight" attrs="{'invisible':['|',('done_stage_boolean','=',False),('open_boolean','=',False)]}"/> <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)]}"/>
...@@ -46,18 +47,25 @@ ...@@ -46,18 +47,25 @@
<field name="is_support" invisible="1"/> <field name="is_support" invisible="1"/>
<field name="is_erp" invisible="1"/> <field name="is_erp" invisible="1"/>
<field name="is_emergency" invisible="1"/> <field name="is_emergency" invisible="1"/>
<field name="is_purchase" invisible="1"/>
<field name="in_proggres_stage" invisible="1"/>
<field name="team_members" widget="many2manytags" invisible="1"/> <field name="team_members" widget="many2manytags" invisible="1"/>
<label for="description" string="Descripción del problema"/> <label for="description" string="Descripción del problema"/>
<h3><field name="description" placeholder="Descripción"/></h3> <h3>
<field name="description" placeholder="Descripción" attrs="{'invisible':[('is_support', '=', True)]}"/>
<field name="support_description" placeholder="Descripción" attrs="{'invisible':[('is_support', '=', False)]}"/>
</h3>
<label for="descripcion_solution"/> <label for="descripcion_solution"/>
<h3><field name="descripcion_solution" placeholder="Descripción"/></h3> <h3>
<field name="descripcion_solution" attrs="{'required':[('is_support', '=', True),('in_proggres_stage', '=', True)]}"/>
</h3>
</xpath> </xpath>
<xpath expr="//group[1]" position="replace"></xpath> <xpath expr="//group[1]" position="replace"></xpath>
<xpath expr="//page[1]" position="replace"> <xpath expr="//page[1]" position="replace">
<page string="Información General"> <page string="Información General">
<group> <group>
<group> <group>
<field name="ticket_type"/> <field name="ticket_type" required="1"/>
<field name="team_id" invisible="1"/> <field name="team_id" invisible="1"/>
<field name="team_head" invisible="1"/> <field name="team_head" invisible="1"/>
<field name="team_admin_id" invisible="1"/> <field name="team_admin_id" invisible="1"/>
...@@ -81,6 +89,7 @@ ...@@ -81,6 +89,7 @@
<field name="person_name" invisible="1"/> <field name="person_name" invisible="1"/>
<field name="email" invisible="1"/> <field name="email" invisible="1"/>
<field name="system_id" attrs="{'invisible':[('is_support', '=', False),('is_erp', '=', False),('is_emergency', '=', False)]}"/> <field name="system_id" attrs="{'invisible':[('is_support', '=', False),('is_erp', '=', False),('is_emergency', '=', False)]}"/>
<field name="requires_configuration" attrs="{'invisible':[('is_purchase', '=', False)]}"/>
<field name="module_route" attrs="{'invisible':['|',('is_erp', '=', False),('erp_type','not in',['mejora','reporte'])]}"/> <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="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="required_validation" attrs="{'invisible':['|',('is_erp', '=', False),('erp_type','not in',['mejora','reporte'])]}"/>
...@@ -148,18 +157,9 @@ ...@@ -148,18 +157,9 @@
<xpath expr="//page[2]//group" position="replace"> <xpath expr="//page[2]//group" position="replace">
<div class="row"> <div class="row">
<div class="col-12"> <field name="attachment_ids" widget="many2many_binary"/>
<field name="attachment_ids" context="{'default_res_model': 'helpdesk.ticket','default_res_id':active_id}">
<tree>
<field name="name"/>
<field name="type"/>
<field name="original_id"/>
<field name="datas"/>
</tree>
</field>
</div>
</div> </div>
</xpath> </xpath>
</field> </field>
...@@ -237,6 +237,19 @@ ...@@ -237,6 +237,19 @@
<attribute name="style"></attribute> <attribute name="style"></attribute>
</t> </t>
</xpath> </xpath>
<xpath expr="//div[@class='badge badge-pill badge-primary float-right']" position="replace"></xpath>
<xpath expr="//div[@class='badge badge-pill badge-success float-right']" position="replace"></xpath>
<xpath expr="//field[@name='state']" position="replace">
<div class="badge badge-pill float-right">
<field name="user_id"/>
</div>
</xpath>
</field> </field>
</record> </record>
...@@ -247,7 +260,7 @@ ...@@ -247,7 +260,7 @@
<field name="inherit_id" ref="sh_all_in_one_helpdesk.sh_helpdesk_ticket_time_inherit_kanban_view" /> <field name="inherit_id" ref="sh_all_in_one_helpdesk.sh_helpdesk_ticket_time_inherit_kanban_view" />
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//button[@name='action_ticket_start']" position="replace"> <xpath expr="//button[@name='action_ticket_start']" position="replace">
<button name="assign_me" type="object" string="Asignarme" class="btn-primary">Asignarme</button> <button name="open_form_change_user" type="object" string="Asignarme" class="btn-primary">Asignarme</button>
</xpath> </xpath>
<xpath expr="//button[@name='action_ticket_end']" position="replace"> <xpath expr="//button[@name='action_ticket_end']" position="replace">
...@@ -268,6 +281,7 @@ ...@@ -268,6 +281,7 @@
<field name="is_support" invisible="1"/> <field name="is_support" invisible="1"/>
<field name="is_erp" invisible="1"/> <field name="is_erp" invisible="1"/>
<field name="is_emergency" invisible="1"/> <field name="is_emergency" invisible="1"/>
<field name="is_purchase" invisible="1"/>
<field name="erp_type" widget="radio" attrs="{'invisible':[('is_erp', '=', False)]}" options="{'horizontal': true}"/> <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="erp_id" attrs="{'invisible':[('is_erp', '=', False)]}"/>
<field name="warehouse_id" attrs="{'invisible':[('is_erp', '=', False)]}"/> <field name="warehouse_id" attrs="{'invisible':[('is_erp', '=', False)]}"/>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<template id="portal_ticket_page_support" name="Ticket Portal Template" inherit_id="portal.portal_sidebar" primary="True"> <template id="portal_ticket_page_support" name="Ticket Portal Template" inherit_id="portal.portal_sidebar" primary="True">
<xpath expr="//div[hasclass('o_portal_sidebar')]" position="inside"> <xpath expr="//div[hasclass('o_portal_sidebar')]" position="inside">
<div class="row mt16 o_portal_ticket_sidebar"> <div class="row mt16 o_portal_ticket_sidebar">
<!-- Sidebar --> <!-- Sidebar
<t t-call="portal.portal_record_sidebar"> <t t-call="portal.portal_record_sidebar">
<t t-set="classes" t-value="'col-12 col-lg flex-lg-grow-0 d-print-none'" /> <t t-set="classes" t-value="'col-12 col-lg flex-lg-grow-0 d-print-none'" />
<t t-set="title"> <t t-set="title">
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</li> </li>
</ul> </ul>
</t> </t>
</t> </t>-->
<!-- Page Content --> <!-- Page Content -->
<div id="ticket_content" class="col-12 col-lg justify-content-end"> <div id="ticket_content" class="col-12 col-lg justify-content-end">
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-sm-12 col-md-6 col-lg-6"> <div t-if="soporte.create_date" class="mb-3 col-sm-12 col-md-6 col-lg-6">
<div class="row"> <div class="row">
<div class="col-6"> <div class="col-6">
<strong>Fecha de creación:</strong> <strong>Fecha de creación:</strong>
...@@ -126,28 +126,7 @@ ...@@ -126,28 +126,7 @@
</div> </div>
</div> </div>
<div class="row">
<div class="mb-3 col-sm-12 col-md-6 col-lg-6">
<div class="row">
<div class="col-6">
<strong>Fecha de replica:</strong>
</div>
<div class="col-6">
<span t-field="soporte.replied_date" />
</div>
</div>
</div>
<div class="mb-3 col-sm-12 col-md-6 col-lg-6">
<div class="row">
<div class="col-6">
<strong>Fecha de cierre</strong>
</div>
<div class="col-6">
<span t-field="soporte.close_date" />
</div>
</div>
</div>
</div>
<div class="row"> <div class="row">
<div class="mb-3 col-sm-12 col-md-6 col-lg-6"> <div class="mb-3 col-sm-12 col-md-6 col-lg-6">
<div class="row"> <div class="row">
...@@ -159,7 +138,7 @@ ...@@ -159,7 +138,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-sm-12 col-md-6 col-lg-6"> <div t-if="soporte.close_by" class="mb-3 col-sm-12 col-md-6 col-lg-6">
<div class="row"> <div class="row">
<div class="col-6"> <div class="col-6">
<strong>Cerrado por: </strong> <strong>Cerrado por: </strong>
...@@ -171,7 +150,7 @@ ...@@ -171,7 +150,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-sm-12 col-md-6 col-lg-6"> <div t-if="soporte.cancel_date" class="col-sm-12 col-md-6 col-lg-6">
<div class="row mb-3 "> <div class="row mb-3 ">
<div class="col-6"> <div class="col-6">
<strong>Fecha de cancelación:</strong> <strong>Fecha de cancelación:</strong>
...@@ -181,7 +160,7 @@ ...@@ -181,7 +160,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-sm-12 col-md-6 col-lg-6"> <div t-if="soporte.cancel_by" class="col-sm-12 col-md-6 col-lg-6">
<div class="row mb-3 "> <div class="row mb-3 ">
<div class="col-6"> <div class="col-6">
<strong>Cancelado por:</strong> <strong>Cancelado por:</strong>
...@@ -203,7 +182,7 @@ ...@@ -203,7 +182,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-sm-12 col-md-6 col-lg-6"> <div t-if="soporte.cancel_reason" class="mb-3 col-sm-12 col-md-6 col-lg-6">
<div class="row mb-3 "> <div class="row mb-3 ">
<div class="col-6"> <div class="col-6">
<strong>Razón de cancelación:</strong> <strong>Razón de cancelación:</strong>
...@@ -214,6 +193,18 @@ ...@@ -214,6 +193,18 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row">
<div t-if="soporte.close_date" class="mb-3 col-sm-12 col-md-6 col-lg-6">
<div class="row">
<div class="col-6">
<strong>Fecha de cierre</strong>
</div>
<div class="col-6">
<span t-field="soporte.close_date" />
</div>
</div>
</div>
</div>
<t t-if="soporte.comment"> <t t-if="soporte.comment">
<div class="row"> <div class="row">
<div class="mb-3 col-12"> <div class="mb-3 col-12">
...@@ -226,6 +217,7 @@ ...@@ -226,6 +217,7 @@
</div> </div>
</div> </div>
</t> </t>
<t t-if="soporte.description"> <t t-if="soporte.description">
<div class="row"> <div class="row">
<div class="mb-3 col-12"> <div class="mb-3 col-12">
...@@ -285,7 +277,7 @@ ...@@ -285,7 +277,7 @@
<template id="portal_ticket_page_erp" name="Ticket Portal Template" inherit_id="portal.portal_sidebar" primary="True"> <template id="portal_ticket_page_erp" name="Ticket Portal Template" inherit_id="portal.portal_sidebar" primary="True">
<xpath expr="//div[hasclass('o_portal_sidebar')]" position="inside"> <xpath expr="//div[hasclass('o_portal_sidebar')]" position="inside">
<div class="row mt16 o_portal_ticket_sidebar"> <div class="row mt16 o_portal_ticket_sidebar">
<!-- Sidebar --> <!-- Sidebar
<t t-call="portal.portal_record_sidebar"> <t t-call="portal.portal_record_sidebar">
<t t-set="classes" t-value="'col-12 col-lg flex-lg-grow-0 d-print-none'" /> <t t-set="classes" t-value="'col-12 col-lg flex-lg-grow-0 d-print-none'" />
<t t-set="title"> <t t-set="title">
...@@ -319,7 +311,7 @@ ...@@ -319,7 +311,7 @@
</li> </li>
</ul> </ul>
</t> </t>
</t> </t>-->
<!-- Page Content --> <!-- Page Content -->
<div id="ticket_content" class="col-12 col-lg justify-content-end"> <div id="ticket_content" class="col-12 col-lg justify-content-end">
...@@ -419,7 +411,7 @@ ...@@ -419,7 +411,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-sm-12 col-md-6 col-lg-6"> <div t-if="asistencia.close_date" class="mb-3 col-sm-12 col-md-6 col-lg-6">
<div class="row"> <div class="row">
<div class="col-6"> <div class="col-6">
<strong>Fecha de cierre:</strong> <strong>Fecha de cierre:</strong>
...@@ -441,7 +433,7 @@ ...@@ -441,7 +433,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-sm-12 col-md-6 col-lg-6"> <div t-if="asistencia.close_by" class="mb-3 col-sm-12 col-md-6 col-lg-6">
<div class="row"> <div class="row">
<div class="col-6"> <div class="col-6">
<strong>Cerrado por:</strong> <strong>Cerrado por:</strong>
...@@ -453,7 +445,7 @@ ...@@ -453,7 +445,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="mb-3 col-sm-12 col-md-6 col-lg-6"> <div t-if="asistencia.cancel_date" class="mb-3 col-sm-12 col-md-6 col-lg-6">
<div class="row"> <div class="row">
<div class="col-6"> <div class="col-6">
<strong>Fecha de cancelación:</strong> <strong>Fecha de cancelación:</strong>
...@@ -463,7 +455,7 @@ ...@@ -463,7 +455,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-sm-12 col-md-6 col-lg-6"> <div t-if="asistencia.cancel_by" class="mb-3 col-sm-12 col-md-6 col-lg-6">
<div class="row"> <div class="row">
<div class="col-6"> <div class="col-6">
<strong>Cancelado por:</strong> <strong>Cancelado por:</strong>
...@@ -485,7 +477,7 @@ ...@@ -485,7 +477,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-sm-12 col-md-6 col-lg-6"> <div t-if="asistencia.cancel_reason" class="mb-3 col-sm-12 col-md-6 col-lg-6">
<div class="row"> <div class="row">
<div class="col-6"> <div class="col-6">
<strong>Razón de cancelación:</strong> <strong>Razón de cancelación:</strong>
...@@ -655,7 +647,7 @@ ...@@ -655,7 +647,7 @@
<template id="portal_ticket_page_911" name="Ticket Portal Template" inherit_id="portal.portal_sidebar" primary="True"> <template id="portal_ticket_page_911" name="Ticket Portal Template" inherit_id="portal.portal_sidebar" primary="True">
<xpath expr="//div[hasclass('o_portal_sidebar')]" position="inside"> <xpath expr="//div[hasclass('o_portal_sidebar')]" position="inside">
<div class="row mt16 o_portal_ticket_sidebar"> <div class="row mt16 o_portal_ticket_sidebar">
<!-- Sidebar --> <!-- Sidebar
<t t-call="portal.portal_record_sidebar"> <t t-call="portal.portal_record_sidebar">
<t t-set="classes" t-value="'col-12 col-lg flex-lg-grow-0 d-print-none'" /> <t t-set="classes" t-value="'col-12 col-lg flex-lg-grow-0 d-print-none'" />
<t t-set="title"> <t t-set="title">
...@@ -697,18 +689,17 @@ ...@@ -697,18 +689,17 @@
</div> </div>
<div class="col pl-0" style="min-width: 150px;"> <div class="col pl-0" style="min-width: 150px;">
<span>Heber Carvajal, </span> <span>Heber Carvajal, </span>
<!--<a href="#discussion" class="small"><i class="fa fa-comment"></i> Mandar Mensaje:</a>-->
</div> </div>
<div class="col pl-0" style="min-width: 150px;"> <div class="col pl-0" style="min-width: 150px;">
<span>33 1600 8962</span> <span>33 1600 8962</span>
<!--<a href="#discussion" class="small"><i class="fa fa-comment"></i> Mandar Mensaje:</a>-->
</div> </div>
</t> </t>
</div> </div>
</li> </li>
</ul> </ul>
</t> </t>
</t> </t> -->
<!-- Page Content --> <!-- Page Content -->
<div id="ticket_content" class="col-12 col-lg justify-content-end"> <div id="ticket_content" class="col-12 col-lg justify-content-end">
...@@ -817,7 +808,7 @@ ...@@ -817,7 +808,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-sm-12 col-md-6 col-lg-6"> <div t-if="ti.close_date" class="mb-3 col-sm-12 col-md-6 col-lg-6">
<div class="row"> <div class="row">
<div class="col-6"> <div class="col-6">
<strong>Fecha de cierre:</strong> <strong>Fecha de cierre:</strong>
...@@ -839,7 +830,7 @@ ...@@ -839,7 +830,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-sm-12 col-md-6 col-lg-6"> <div t-if="ti.close_by" class="mb-3 col-sm-12 col-md-6 col-lg-6">
<div class="row"> <div class="row">
<div class="col-6"> <div class="col-6">
<strong>Cerrado por:</strong> <strong>Cerrado por:</strong>
...@@ -851,7 +842,7 @@ ...@@ -851,7 +842,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="mb-3 col-sm-12 col-md-6 col-lg-6"> <div t-if="ti.cancel_date" class="mb-3 col-sm-12 col-md-6 col-lg-6">
<div class="row"> <div class="row">
<div class="col-6"> <div class="col-6">
<strong>Fecha de cancelación:</strong> <strong>Fecha de cancelación:</strong>
...@@ -861,7 +852,7 @@ ...@@ -861,7 +852,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-sm-12 col-md-6 col-lg-6"> <div t-if="ti.cancel_by" class="mb-3 col-sm-12 col-md-6 col-lg-6">
<div class="row"> <div class="row">
<div class="col-6"> <div class="col-6">
<strong>Cancelado por:</strong> <strong>Cancelado por:</strong>
...@@ -883,7 +874,7 @@ ...@@ -883,7 +874,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-sm-12 col-md-6 col-lg-6"> <div t-if="ti.cancel_reason" class="mb-3 col-sm-12 col-md-6 col-lg-6">
<div class="row"> <div class="row">
<div class="col-6"> <div class="col-6">
<strong>Motivo de cancelación:</strong> <strong>Motivo de cancelación:</strong>
......
from . import change_ticket_user
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="change_ticket_user_view_form" model="ir.ui.view">
<field name="name">change.ticket.user.form</field>
<field name="model">change.ticket.user</field>
<field name="arch" type="xml">
<form string="">
<group>
<p>El ticket ya tiene un usuario asignado,¿Desea cambiar de usuario?</p>
</group>
<field name="ticket_id" invisible="1"/>
<footer>
<button name="accept_change_user" string="Aceptar" type="object" class="btn-primary" />
<button name="action_cancel" string="Cancel" class="btn-secondary" type="object" />
</footer>
</form>
</field>
</record>
</data>
</odoo>
\ No newline at end of file
from odoo import models, fields, api, _
from odoo.exceptions import UserError
class ChangeTicketUser(models.TransientModel):
_name = 'change.ticket.user'
_description = 'Módulo encargado de traer la información del usuario'
ticket_id = fields.Many2one('helpdesk.ticket','Ticket')
def accept_change_user(self):
self.ticket_id.update({'user_id':self.env.user.id})
def action_cancel(self):
return {'type': 'ir.actions.act_window_close'}
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