Commit 34a518c5 by Arturo Jasso Origel

se cambiaron vistas de soporte y erp, se retiraron valores de agrupación y se…

se cambiaron vistas de soporte y erp, se retiraron valores de agrupación y se dejo por default el estado, del ticket, se agregaron funciones de reporte y se retiro el campo de tipo ticket y se agregó el valor de categoría
parent 0a8a86b5
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
'views/odoo/helpdesk_ticket.xml', 'views/odoo/helpdesk_ticket.xml',
'views/odoo/helpdesk_team.xml', 'views/odoo/helpdesk_team.xml',
'views/odoo/helpdesk_warehouse.xml', 'views/odoo/helpdesk_warehouse.xml',
'views/odoo/erp_system.xml',
'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',
......
...@@ -20,8 +20,6 @@ class WebsiteTickets(DownloadReport): ...@@ -20,8 +20,6 @@ class WebsiteTickets(DownloadReport):
@http.route('/helpdesk/ticket/feedback/<ticket_id>', type="http", auth="public", website=True, csrf=False) @http.route('/helpdesk/ticket/feedback/<ticket_id>', type="http", auth="public", website=True, csrf=False)
def helpdesk_ticket_feedback_thanks(self, ticket_id, **kw): def helpdesk_ticket_feedback_thanks(self, ticket_id, **kw):
_logger.info('Entra custom')
_logger.info(kw)
dic = {} dic = {}
if kw.get('problem_solved') == 'True': if kw.get('problem_solved') == 'True':
dic.update({ dic.update({
...@@ -57,7 +55,6 @@ class WebsiteTickets(DownloadReport): ...@@ -57,7 +55,6 @@ class WebsiteTickets(DownloadReport):
dic.update({ dic.update({
'customer_comment': kw.get('comment'), 'customer_comment': kw.get('comment'),
}) })
_logger.info(dic)
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)
if ticket: if ticket:
......
...@@ -82,7 +82,7 @@ class PortalHelpdeskMorsaEmergency(PortalHelpdesk): ...@@ -82,7 +82,7 @@ class PortalHelpdeskMorsaEmergency(PortalHelpdesk):
return domain return domain
@http.route(['/my/911', '/my/911/page/<int:page>'],type='http',auth="user",website=True) @http.route(['/my/911', '/my/911/page/<int:page>'],type='http',auth="user",website=True)
def portal_my_911(self,ctr='show',page=1,sortby=None,filterby=None,search=None,search_in='all',groupby='create_by',**kw): def portal_my_911(self,ctr='show',page=1,sortby=None,filterby=None,search=None,search_in='all',groupby='status',**kw):
values = self._prepare_portal_layout_values() values = self._prepare_portal_layout_values()
HelpdeskTicket = request.env['helpdesk.ticket'].sudo() HelpdeskTicket = request.env['helpdesk.ticket'].sudo()
#domain = self.prepare_portal_layout_911() #domain = self.prepare_portal_layout_911()
...@@ -104,42 +104,23 @@ class PortalHelpdeskMorsaEmergency(PortalHelpdesk): ...@@ -104,42 +104,23 @@ class PortalHelpdeskMorsaEmergency(PortalHelpdesk):
} }
searchbar_groupby = { searchbar_groupby = {
'create_by': {
'input': 'create_by',
'label': _('Created By')
},
'ticket_type': {
'input': 'ticket_type',
'label': _('Ticket Type')
},
'status': { 'status': {
'input': 'status', 'input': 'status',
'label': _('Status') 'label': _('Status')
}, },
'customer': {
'input': 'customer',
'label': _('Customer')
},
'category': { 'category': {
'input': 'category', 'input': 'category',
'label': _('Category') 'label': _('Category')
}, },
'subcategory': {
'input': 'subcategory',
'label': _('Sub Category')
},
'subject': {
'input': 'subject',
'label': _('Subject')
},
'priority': { 'priority': {
'input': 'priority', 'input': 'priority',
'label': _('Priority') 'label': _('Priority')
}, },
'state': {
'input': 'state',
'label': _('Reply Status')
},
} }
#domain = self._prepare_portal_layout_911() #domain = self._prepare_portal_layout_911()
today = fields.Date.today() today = fields.Date.today()
......
...@@ -82,7 +82,7 @@ class PortalHelpdeskMorsaErp(PortalHelpdesk): ...@@ -82,7 +82,7 @@ class PortalHelpdeskMorsaErp(PortalHelpdesk):
return domain return domain
@http.route(['/my/erp', '/my/erp/page/<int:page>'],type='http',auth="user",website=True) @http.route(['/my/erp', '/my/erp/page/<int:page>'],type='http',auth="user",website=True)
def portal_my_erp(self,ctr='show',page=1,sortby=None,filterby=None,search=None,search_in='all',groupby='create_by',**kw): def portal_my_erp(self,ctr='show',page=1,sortby=None,filterby=None,search=None,search_in='all',groupby='status',**kw):
values = self._prepare_portal_layout_values() values = self._prepare_portal_layout_values()
HelpdeskTicket = request.env['helpdesk.ticket'].sudo() HelpdeskTicket = request.env['helpdesk.ticket'].sudo()
#domain = self._prepare_portal_layout_erp_asistence() #domain = self._prepare_portal_layout_erp_asistence()
...@@ -104,42 +104,32 @@ class PortalHelpdeskMorsaErp(PortalHelpdesk): ...@@ -104,42 +104,32 @@ class PortalHelpdeskMorsaErp(PortalHelpdesk):
} }
searchbar_groupby = { searchbar_groupby = {
'create_by': {
'input': 'create_by',
'label': _('Created By')
},
'ticket_type': {
'input': 'ticket_type',
'label': _('Ticket Type')
},
'status': { 'status': {
'input': 'status', 'input': 'status',
'label': _('Status') 'label': _('Status')
}, },
'customer': {
'input': 'customer',
'label': _('Customer')
},
'category': { 'category': {
'input': 'category', 'input': 'category',
'label': _('Category') 'label': _('Category')
}, },
'subcategory': {
'input': 'subcategory',
'label': _('Sub Category')
},
'subject': {
'input': 'subject',
'label': _('Subject')
},
'priority': { 'priority': {
'input': 'priority', 'input': 'priority',
'label': _('Priority') 'label': _('Priority')
}, },
'state': {
'input': 'state', 'sucursal':{
'label': _('Reply Status') 'input': 'sucursal',
'label': _('Sucursal')
}, },
'modulo':{
'input': 'modulo',
'label': _('Módulo')
}
} }
today = fields.Date.today() today = fields.Date.today()
...@@ -264,7 +254,7 @@ class PortalHelpdeskMorsaErp(PortalHelpdesk): ...@@ -264,7 +254,7 @@ class PortalHelpdeskMorsaErp(PortalHelpdesk):
domain = AND([domain, ticket_domain]) domain = AND([domain, ticket_domain])
# count for pager # count for pager
erp_count = len(HelpdeskTicket.search(domain).filtered(lambda h: h.team_id == request.env.ref('helpdesk_morsa.erp_asistense').id)) erp_count = len(HelpdeskTicket.search(domain).filtered(lambda h: h.team_id.id == request.env.ref('helpdesk_morsa.erp_asistense').id))
# pager # pager
pager = portal_pager(url="/my/erp",url_args={'sortby': sortby,'search_in': search_in,'search': search,'filterby': filterby},total=erp_count,page=page,step=self._items_per_page) pager = portal_pager(url="/my/erp",url_args={'sortby': sortby,'search_in': search_in,'search': search,'filterby': filterby},total=erp_count,page=page,step=self._items_per_page)
if groupby == 'create_by': if groupby == 'create_by':
...@@ -285,6 +275,10 @@ class PortalHelpdeskMorsaErp(PortalHelpdesk): ...@@ -285,6 +275,10 @@ class PortalHelpdeskMorsaErp(PortalHelpdesk):
order = "priority, %s" % order order = "priority, %s" % order
elif groupby == 'state': elif groupby == 'state':
order = 'state,%s' % order order = 'state,%s' % order
elif groupby == 'sucursal':
order = 'warehouse_id,%s' % order
elif groupby == 'modulo':
order = 'erp_id,%s' % order
tickets = HelpdeskTicket.search(domain,order=order,limit=self._items_per_page,offset=pager['offset']) tickets = HelpdeskTicket.search(domain,order=order,limit=self._items_per_page,offset=pager['offset'])
...@@ -334,6 +328,16 @@ class PortalHelpdeskMorsaErp(PortalHelpdesk): ...@@ -334,6 +328,16 @@ class PortalHelpdeskMorsaErp(PortalHelpdesk):
HelpdeskTicket.concat(*g) HelpdeskTicket.concat(*g)
for k, g in groupbyelem(tickets, itemgetter('state')) for k, g in groupbyelem(tickets, itemgetter('state'))
] ]
elif groupby == 'sucursal':
grouped_tickets = [
HelpdeskTicket.concat(*g)
for k, g in groupbyelem(tickets, itemgetter('warehouse_id'))
]
elif groupby == 'modulo':
grouped_tickets = [
HelpdeskTicket.concat(*g)
for k, g in groupbyelem(tickets, itemgetter('erp_id'))
]
# content according to pager and archive selected # content according to pager and archive selected
values.update({ values.update({
'created':ctr, 'created':ctr,
...@@ -421,11 +425,36 @@ class PortalHelpdeskMorsaErp(PortalHelpdesk): ...@@ -421,11 +425,36 @@ class PortalHelpdeskMorsaErp(PortalHelpdesk):
ticket_dic.update({ ticket_dic.update({
'erp_id':portal_module_id.id 'erp_id':portal_module_id.id
}) })
else:
self.raise_error("Es necesario el apartado de modulo para crear su ticket")
elif kw.get('portal_erp_type') == 'mejora': elif kw.get('portal_erp_type') == 'mejora':
if kw.get('portal_route'):
ticket_dic.update({
'module_route': kw.get('portal_route')
})
if kw.get('portal_process'):
ticket_dic.update({
'process_text': kw.get('portal_process')
})
if kw.get('portal_validations'):
ticket_dic.update({
'required_validation': kw.get('portal_validations')
})
if kw.get('portal_scenery'):
ticket_dic.update({
'common_scenery': kw.get('portal_scenery')
})
if kw.get('portal_impact'):
ticket_dic.update({
'module_impact': kw.get('portal_impact')
})
if kw.get('portal_module_improve') and kw.get('portal_module_improve') != 'modulo':
portal_module_id = request.env['erp.modules'].sudo().browse(int(kw.get('portal_module_improve')))
if portal_module_id:
ticket_dic.update({
'erp_id':portal_module_id.id
})
if 'portal_file' not in request.params and 'portal_file_mejora' not in request.params: if 'portal_file' not in request.params and 'portal_file_mejora' not in request.params:
return json.dumps({"resp":"Error","message":"Es necesario agregar la archivos"}) return json.dumps({"resp":"Error","message":"Es necesario agregar la archivos"})
else: else:
......
...@@ -84,7 +84,7 @@ class PortalHelpdeskMorsaSoporte(PortalHelpdesk): ...@@ -84,7 +84,7 @@ class PortalHelpdeskMorsaSoporte(PortalHelpdesk):
@http.route(['/my/soporte', '/my/soporte/page/<int:page>'],type='http',auth="user",website=True) @http.route(['/my/soporte', '/my/soporte/page/<int:page>'],type='http',auth="user",website=True)
def portal_my_soporte(self,ctr='show',page=1,sortby=None,filterby=None,search=None,search_in='all',groupby='create_by',**kw): def portal_my_soporte(self,ctr='show',page=1,sortby=None,filterby=None,search=None,search_in='all',groupby='status',**kw):
values = self._prepare_portal_layout_values() values = self._prepare_portal_layout_values()
HelpdeskTicket = request.env['helpdesk.ticket'].sudo() HelpdeskTicket = request.env['helpdesk.ticket'].sudo()
#domain = self._prepare_technial_support() #domain = self._prepare_technial_support()
...@@ -106,42 +106,23 @@ class PortalHelpdeskMorsaSoporte(PortalHelpdesk): ...@@ -106,42 +106,23 @@ class PortalHelpdeskMorsaSoporte(PortalHelpdesk):
} }
searchbar_groupby = { searchbar_groupby = {
'create_by': {
'input': 'create_by',
'label': _('Created By')
},
'ticket_type': {
'input': 'ticket_type',
'label': _('Ticket Type')
},
'status': { 'status': {
'input': 'status', 'input': 'status',
'label': _('Status') 'label': _('Status')
}, },
'customer': {
'input': 'customer',
'label': _('Customer')
},
'category': { 'category': {
'input': 'category', 'input': 'category',
'label': _('Category') 'label': _('Category')
}, },
'subcategory': {
'input': 'subcategory',
'label': _('Sub Category')
},
'subject': {
'input': 'subject',
'label': _('Subject')
},
'priority': { 'priority': {
'input': 'priority', 'input': 'priority',
'label': _('Priority') 'label': _('Priority')
}, },
'state': {
'input': 'state',
'label': _('Reply Status')
},
} }
today = fields.Date.today() today = fields.Date.today()
...@@ -363,7 +344,7 @@ class PortalHelpdeskMorsaSoporte(PortalHelpdesk): ...@@ -363,7 +344,7 @@ class PortalHelpdeskMorsaSoporte(PortalHelpdesk):
@http.route('/portal-create-ticket-soporte', type='http', auth='public',csrf=False) @http.route('/portal-create-ticket-soporte', type='http', auth='public',csrf=False)
def portal_create_ticket_support(self, **kw): def portal_create_ticket_support(self, **kw):
try: try:
_logger.info(kw)
login_user = request.env.user login_user = request.env.user
if login_user and login_user.login != 'public': if login_user and login_user.login != 'public':
partner_id = False partner_id = False
......
from . import ticket_reason from . import ticket_reason
from . import warehouse_helpdesk from . import warehouse_helpdesk
from . import erp_module from . import erp_module
from . import erp_system
from . import region_helpdesk from . import region_helpdesk
from . import res_users from . import res_users
from . import helpdesk_team from . import helpdesk_team
......
from odoo import models, fields, api, _
from odoo.exceptions import UserError
class ErpSystem(models.Model):
_name = 'erp.system'
_rec_name = 'name'
name = fields.Char('Nombre')
\ No newline at end of file
...@@ -14,7 +14,7 @@ _logger = logging.getLogger(__name__) ...@@ -14,7 +14,7 @@ _logger = logging.getLogger(__name__)
class HelpdeskTicket(models.Model): class HelpdeskTicket(models.Model):
_inherit = 'helpdesk.ticket' _inherit = 'helpdesk.ticket'
erp_id = fields.Many2one('erp.modules','ERP') erp_id = fields.Many2one('erp.modules','Módulo')
incidence_type = fields.Selection([ incidence_type = fields.Selection([
('odoo', 'Falla Odoo Nacional'), ('odoo', 'Falla Odoo Nacional'),
('mclick','Falla Morsa Click Nacional'), ('mclick','Falla Morsa Click Nacional'),
...@@ -24,7 +24,7 @@ class HelpdeskTicket(models.Model): ...@@ -24,7 +24,7 @@ class HelpdeskTicket(models.Model):
call_before_10 = fields.Boolean('Atención antes de 10 minutos') call_before_10 = fields.Boolean('Atención antes de 10 minutos')
color = fields.Integer('Color',compute="_get_color") color = fields.Integer('Color',compute="_get_color")
erp_type = fields.Selection([ erp_type = fields.Selection([
('soporte','Soporte'),('mejora','Mejora') ('soporte','Soporte'),('mejora','Mejora'),('reporte','Reporte')
],string="Tipo de asistencia") ],string="Tipo de asistencia")
ticket_reason = fields.Many2one('ticket.reason','Motivo de Ticket', ticket_reason = fields.Many2one('ticket.reason','Motivo de Ticket',
default=lambda self: self.env['ticket.reason'].search([('name','=','Ninguno'),],limit=1).id default=lambda self: self.env['ticket.reason'].search([('name','=','Ninguno'),],limit=1).id
...@@ -39,6 +39,14 @@ class HelpdeskTicket(models.Model): ...@@ -39,6 +39,14 @@ class HelpdeskTicket(models.Model):
user_region_id = fields.Many2one('region.helpdesk', related="user_branch_id.region_id", string="Región", store=True,) user_region_id = fields.Many2one('region.helpdesk', related="user_branch_id.region_id", string="Región", store=True,)
user_id = fields.Many2one('res.users',string="Usuario Asignado", tracking=True,domain="[('id','in',team_members)]") user_id = fields.Many2one('res.users',string="Usuario Asignado", tracking=True,domain="[('id','in',team_members)]")
team_members = fields.Many2many('res.users',relation="team_members_user_rel",related="team_id.team_members") team_members = fields.Many2many('res.users',relation="team_members_user_rel",related="team_id.team_members")
module_route = fields.Char("Ruta de la transacción")
process_text = fields.Char("¿En que proceso utilizas la transacción?")
required_validation = fields.Char("Cuales son las validaciones que se requieren")
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')
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
...@@ -52,7 +60,7 @@ class HelpdeskTicket(models.Model): ...@@ -52,7 +60,7 @@ class HelpdeskTicket(models.Model):
for rec in self: for rec in self:
if rec.team_head: if rec.team_head:
rec.color = 10 rec.color = 10
if rec.is_support == True or rec.is_erp == True or rec.is_emergency == True: if rec.is_support == True or rec.is_emergency == True:
if fields.Datetime.now() >= rec.create_date+timedelta(hours=simple_time) and fields.Datetime.now() < rec.create_date+timedelta(hours=medium_time) and rec.stage_id.id in [new_stage]: if fields.Datetime.now() >= rec.create_date+timedelta(hours=simple_time) and fields.Datetime.now() < rec.create_date+timedelta(hours=medium_time) and rec.stage_id.id in [new_stage]:
rec.color = self.env['ir.config_parameter'].sudo().get_param('helpdesk_morsa.color_simple_alert') rec.color = self.env['ir.config_parameter'].sudo().get_param('helpdesk_morsa.color_simple_alert')
elif fields.Datetime.now() >= rec.create_date+timedelta(hours=medium_time) and fields.Datetime.now() < rec.create_date+timedelta(hours=extreme_time) and rec.stage_id.id in [new_stage,ten_min]: elif fields.Datetime.now() >= rec.create_date+timedelta(hours=medium_time) and fields.Datetime.now() < rec.create_date+timedelta(hours=extreme_time) and rec.stage_id.id in [new_stage,ten_min]:
...@@ -315,7 +323,7 @@ class HelpdeskTicket(models.Model): ...@@ -315,7 +323,7 @@ class HelpdeskTicket(models.Model):
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 "description" in vals and vals['description'] != '<p><br></p>' and (self.is_support == True or self.is_erp == True or self.is_emergency == True): if 'description' in vals and vals["description"] != "" and vals['description'] != '<p><br></p>' and (self.is_support == True or self.is_erp == True or self.is_emergency == True):
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'))
if len(vals['description'])-11 < min_description: if len(vals['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"))
......
...@@ -11,6 +11,9 @@ admin_ticket_reason,ticket.reason.admin,model_ticket_reason,sh_all_in_one_helpde ...@@ -11,6 +11,9 @@ admin_ticket_reason,ticket.reason.admin,model_ticket_reason,sh_all_in_one_helpde
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,0,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
admin_erp_system,region.helpdes.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
user_crm_lead,crm.lead.user,crm.model_crm_lead,sh_all_in_one_helpdesk.helpdesk_group_user,1,0,0,0 user_crm_lead,crm.lead.user,crm.model_crm_lead,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_purchase_order,purchase.order.user,purchase.model_purchase_order,sh_all_in_one_helpdesk.helpdesk_group_user,1,0,0,0
......
...@@ -82,7 +82,7 @@ $(document).ready(function(e) { ...@@ -82,7 +82,7 @@ $(document).ready(function(e) {
e.preventDefault(); e.preventDefault();
swal({ swal({
title:"Error", title:"Error",
text: "Es necesario selecciona el tipo de ticket si es Soporte o Mejora", text: "Es necesario selecciona el tipo de ticket si es Soporte, Mejora o Reporte",
icon: "error", icon: "error",
buttons: "Ok", buttons: "Ok",
}); });
...@@ -116,7 +116,7 @@ $(document).ready(function(e) { ...@@ -116,7 +116,7 @@ $(document).ready(function(e) {
icon: "error", icon: "error",
buttons: "Ok", buttons: "Ok",
}); });
}else if (rqued['portal_sucursal'] == 0){ }else if (rqued['portal_sucursal'] == ""){
e.preventDefault(); e.preventDefault();
swal({ swal({
...@@ -125,7 +125,7 @@ $(document).ready(function(e) { ...@@ -125,7 +125,7 @@ $(document).ready(function(e) {
icon: "error", icon: "error",
buttons: "Ok", buttons: "Ok",
}); });
}else if (rqued['portal_module'] == 0){ }else if (rqued['portal_module'] == ""){
e.preventDefault(); e.preventDefault();
swal({ swal({
...@@ -135,7 +135,7 @@ $(document).ready(function(e) { ...@@ -135,7 +135,7 @@ $(document).ready(function(e) {
buttons: "Ok", buttons: "Ok",
}); });
} }
}else if(erp_type == "mejora"){ }else if(erp_type == "mejora" || erp_type == "reporte"){
var rqued = required_erp_improve(); var rqued = required_erp_improve();
if (rqued['portal_contact_name'] == ""){ if (rqued['portal_contact_name'] == ""){
...@@ -169,6 +169,73 @@ $(document).ready(function(e) { ...@@ -169,6 +169,73 @@ $(document).ready(function(e) {
}); });
} }
else if (rqued['portal_route'] == 0){
e.preventDefault();
swal({
title:"Error",
text:"Es necesario agregar la Ruta de la transacción",
buttons:"ok",
icon:"error"
});
}
else if (rqued['portal_process'] == ""){
e.preventDefault();
swal({
title:"Error",
text:"Es necesario responder a '¿En que proceso utilizas la transacción?'",
buttons:"ok",
icon:"error"
});
}
else if (rqued['portal_validations'] == ""){
e.preventDefault();
swal({
title:"Error",
text:"Es necesario responder a 'Cuales son las validaciones que se requieren'",
buttons:"ok",
icon:"error"
});
}
else if (rqued['portal_scenery'] == ""){
e.preventDefault();
swal({
title:"Error",
text:"Es necesario responder a '¿Qué escenarios son comunes a trabajar con esta transacción?'",
buttons:"ok",
icon:"error"
});
}
else if (rqued['portal_impact'] == 0){
e.preventDefault();
swal({
title:"Error",
text:"Es necesario respondes a '¿Tu solicitud, impacta de algún modo a algún otro Módulo?'",
buttons:"ok",
icon:"error"
});
}
else if (rqued['portal_module'] == ""){
e.preventDefault();
swal({
title:"Error",
text:"Es necesario agregar el Módulo",
buttons:"ok",
icon:"error"
});
}
else if (rqued['portal_file'] == 0){ else if (rqued['portal_file'] == 0){
e.preventDefault(); e.preventDefault();
...@@ -220,6 +287,17 @@ $(document).ready(function(e) { ...@@ -220,6 +287,17 @@ $(document).ready(function(e) {
buttons: "Ok", buttons: "Ok",
}); });
} }
else if (rqued['portal_file'] == 0){
e.preventDefault();
swal({
title:"Error",
text:"Es necesario agregar los archivos de mejora",
buttons:"ok",
icon:"error"
});
}
} }
}); });
...@@ -266,6 +344,12 @@ $(document).ready(function(e) { ...@@ -266,6 +344,12 @@ $(document).ready(function(e) {
'portal_contact_name': $("#portal_contact_name").val(), 'portal_contact_name': $("#portal_contact_name").val(),
'portal_email': $("#portal_email").val(), 'portal_email': $("#portal_email").val(),
'portal_phone': $("#portal_phone").val(), 'portal_phone': $("#portal_phone").val(),
'portal_route':$("#portal_route").val(),
'portal_process':$("#portal_process").val(),
'portal_validations':$("#portal_validations").val(),
'portal_scenery':$("#portal_scenery").val(),
'portal_impact':$("#portal_impact").val(),
'portal_module':$("#portal_module_improve").val(),
'portal_file': document.getElementById('portal_file_mejora').files.length 'portal_file': document.getElementById('portal_file_mejora').files.length
} }
} }
...@@ -419,39 +503,86 @@ $(document).ready(function(e) { ...@@ -419,39 +503,86 @@ $(document).ready(function(e) {
}); });
}); });
var support = document.getElementById('supportButton');
var improve = document.getElementById('improveButton');
var report = document.getElementById('reportButton');
$('#supportButton').on('click', function(){
if (Boolean(support.disabled) == true){
}else if(Boolean(improve.disabled) == true && Boolean(report.disabled) == true){
improve.disabled = false;
report.disabled =false;
$("#portal_erp_type").val("");
$('#supportButton').on("click", function(e){
if (document.getElementById("improveButton").disabled == true){
document.getElementById("improveButton").disabled = false;
$('#portal_erp_type').val("")
}else{ }else{
document.getElementById("improveButton").disabled = true; improve.disabled = true;
document.getElementById("portal_sucursal").required = true; report.disabled = true;
document.getElementById("portal_module").required = true; $("#portal_erp_type").val("soporte");
document.getElementById("portal_file").required = false;
$('#portal_erp_type').val("soporte") document.getElementById('portal_sucursal').required = true;
document.getElementById('portal_module').required = true;
document.getElementById('portal_route').required = false;
document.getElementById('portal_process').required = false;
document.getElementById('portal_validations').required = false;
document.getElementById('portal_scenery').required = false;
document.getElementById('portal_impact').required = false;
document.getElementById('portal_module_improve').required = false;
} }
}); });
$('#improveButton').on('click', function(){
$("#improveButton").on("click",function(e){
if (document.getElementById("supportButton").disabled == true){ if (Boolean(improve.disabled) == true){
document.getElementById("supportButton").disabled = false;
$('#portal_erp_type').val("") }else if (Boolean(support.disabled) == true && Boolean(report.disabled) == true){
support.disabled = false;
report.disabled = false;
$("#portal_erp_type").val("");
}else{ }else{
document.getElementById("supportButton").disabled = true; support.disabled = true;
document.getElementById("portal_sucursal").required = false; report.disabled = true;
document.getElementById("portal_module").required = false; $("#portal_erp_type").val("mejora");
//document.getElementById("portal_file").required = true;
$('#portal_sucursal').val(""); document.getElementById('portal_sucursal').required = false;
$('#portal_module').val(""); document.getElementById('portal_module').required = false;
$('#portal_erp_type').val("mejora")
document.getElementById('portal_route').required = true;
document.getElementById('portal_process').required = true;
document.getElementById('portal_validations').required = true;
document.getElementById('portal_scenery').required = true;
document.getElementById('portal_impact').required = true;
document.getElementById('portal_module_improve').required = true;
} }
}); });
$('#reportButton').on('click', function(){
if (Boolean(report.disabled) == true){
}else if (Boolean(improve.disabled) == true && Boolean(support.disabled) == true){
improve.disabled = false;
support.disabled =false;
$("#portal_erp_type").val("");
}else{
improve.disabled = true;
support.disabled = true;
$("#portal_erp_type").val("reporte");
document.getElementById('portal_sucursal').required = false;
document.getElementById('portal_module').required = false;
document.getElementById('portal_route').required = true;
document.getElementById('portal_process').required = true;
document.getElementById('portal_validations').required = true;
document.getElementById('portal_scenery').required = true;
document.getElementById('portal_impact').required = true;
document.getElementById('portal_module_improve').required = true;
}
});
}); });
\ No newline at end of file
...@@ -16,4 +16,6 @@ ...@@ -16,4 +16,6 @@
border-color: #ff9409 !important; border-color: #ff9409 !important;
} }
.modal-content{
max-height:650px !important;
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="helpdesk_system_view_tree" model="ir.ui.view">
<field name="name">erp.system.tree</field>
<field name="model">erp.system</field>
<field name="arch" type="xml">
<tree editable="top">
<field name="name"/>
</tree>
</field>
</record>
<record id="helpdesk_system_act_window" model="ir.actions.act_window">
<field name="name">Sistemas</field>
<field name="res_model">erp.system</field>
<field name="view_mode">tree</field>
</record>
<menuitem
name="Sistemas ERP"
sequence="12" id="helpdesk_erp_system"
parent="sh_all_in_one_helpdesk.helpdesk_config_menu"
action="helpdesk_morsa.helpdesk_system_act_window"/>
</odoo>
\ No newline at end of file
...@@ -13,18 +13,24 @@ ...@@ -13,18 +13,24 @@
<field name="is_emergency" invisible="1"/> <field name="is_emergency" invisible="1"/>
</xpath> </xpath>
<xpath expr="//field[@name='priority']" position="after"> <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_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)]}"/>
<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)]}"/> <field name="incidence_type" attrs="{'invisible':[('is_emergency', '=', False)]}"/>
</xpath> </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"/> <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','=',False)]}"/> <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)]}"/> <button name="action_closed" type="object" string="Cerrar Ticket" class="oe_highlight" attrs="{'invisible':['|',('done_stage_boolean','=',False),('open_boolean','=',True)]}"/>
<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"/>
...@@ -39,9 +45,9 @@ ...@@ -39,9 +45,9 @@
<attribute name="invisible">1</attribute> <attribute name="invisible">1</attribute>
</xpath> </xpath>
<xpath expr="//field[@name='customer_comment']" position="before"> <xpath expr="//field[@name='customer_comment']" position="before">
<field name="problem_solved_on_time"/> <field name="problem_solved_on_time" readonly="1"/>
<field name="good_service_actitude"/> <field name="good_service_actitude" readonly="1"/>
<field name="begin_before_ten_min"/> <field name="begin_before_ten_min" readonly="1"/>
</xpath> </xpath>
<xpath expr="//field[@name='sub_category_id']" position="after"> <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)]}"/>
...@@ -53,6 +59,18 @@ ...@@ -53,6 +59,18 @@
<xpath expr="//field[@name='sh_user_ids']" position="after"> <xpath expr="//field[@name='sh_user_ids']" position="after">
<field name="team_members" widget="many2manytags" invisible="1"/> <field name="team_members" widget="many2manytags" invisible="1"/>
</xpath> </xpath>
<xpath expr="//field[@name='helpdesk_stage_history_line']" position="attributes">
<attribute name="readonly">1</attribute>
<attribute name="force_save">1</attribute>
</xpath>
<xpath expr="//field[@name='priority_new']" position="attributes">
<attribute name="readonly">1</attribute>
<attribute name="force_save">1</attribute>
</xpath>
<xpath expr="//field[@name='customer_comment']" position="attributes">
<attribute name="readonly">1</attribute>
<attribute name="force_save">1</attribute>
</xpath>
</field> </field>
</record> </record>
......
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
<t t-set="background" t-value="'/helpdesk_morsa/static/src/img/support_back.svg'"/> <t t-set="background" t-value="'/helpdesk_morsa/static/src/img/support_back.svg'"/>
</t> </t>
<t t-call="portal.portal_docs_entry"> <t t-call="portal.portal_docs_entry">
<t t-set="title">Asistencia ERP</t> <t t-set="title">Mejora o Asistencia ERP</t>
<t t-set="url" t-value="'/my/erp'" /> <t t-set="url" t-value="'/my/erp'" />
<t t-set="count" t-value="erp_count" /> <t t-set="count" t-value="erp_count" />
<t t-set="desc" t-value="'Soporte y Mejoras Odoo'"/> <t t-set="desc" t-value="'Soporte o Mejoras Odoo'"/>
<t t-set="avatar" t-value="'/helpdesk_morsa/static/src/img/erp.svg'"/> <t t-set="avatar" t-value="'/helpdesk_morsa/static/src/img/erp.svg'"/>
<t t-set="background" t-value="'/helpdesk_morsa/static/src/img/erp_back.svg'"/> <t t-set="background" t-value="'/helpdesk_morsa/static/src/img/erp_back.svg'"/>
</t> </t>
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
<div t-attf-class="#{'card-body' if report_type == 'html' else ''}"> <div t-attf-class="#{'card-body' if report_type == 'html' else ''}">
<div id="informations"> <div id="informations">
<div class="row"> <div class="row">
<div class="mb-3 col-6"> <div 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>Tipo de Ticket: </strong> <strong>Tipo de Ticket: </strong>
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-6"> <div 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>
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="mb-3 col-6"> <div 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>Última actualización:</strong> <strong>Última actualización:</strong>
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-6"> <div 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>Nombre:</strong> <strong>Nombre:</strong>
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
</div> </div>
<div class="row"> <div class="row">
<div class="mb-3 col-6"> <div 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>Correo electrónico:</strong> <strong>Correo electrónico:</strong>
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
</div> </div>
<div class="row"> <div class="row">
<div class="mb-3 col-6"> <div 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 replica:</strong> <strong>Fecha de replica:</strong>
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-6"> <div 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>
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="mb-3 col-6"> <div 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>Prioridad:</strong> <strong>Prioridad:</strong>
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-6"> <div 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 +171,7 @@ ...@@ -171,7 +171,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-6"> <div 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 +181,7 @@ ...@@ -181,7 +181,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class=" col-6"> <div 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>
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="mb-3 col-6"> <div 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>Estado:</strong> <strong>Estado:</strong>
...@@ -203,7 +203,7 @@ ...@@ -203,7 +203,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-6"> <div 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>
...@@ -339,7 +339,7 @@ ...@@ -339,7 +339,7 @@
<div t-attf-class="#{'card-body' if report_type == 'html' else ''}"> <div t-attf-class="#{'card-body' if report_type == 'html' else ''}">
<div id="informations"> <div id="informations">
<div class="row"> <div class="row">
<div class="mb-3 col-6"> <div 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>Tipo de Ticket:</strong> <strong>Tipo de Ticket:</strong>
...@@ -349,7 +349,7 @@ ...@@ -349,7 +349,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-6"> <div 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>
...@@ -361,7 +361,7 @@ ...@@ -361,7 +361,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="mb-3 col-6"> <div 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>Última actualización:</strong> <strong>Última actualización:</strong>
...@@ -371,7 +371,7 @@ ...@@ -371,7 +371,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-6"> <div 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>Nombre:</strong> <strong>Nombre:</strong>
...@@ -383,7 +383,7 @@ ...@@ -383,7 +383,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="mb-3 col-6"> <div 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>Correo electrónico:</strong> <strong>Correo electrónico:</strong>
...@@ -394,31 +394,10 @@ ...@@ -394,31 +394,10 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row">
<div class="mb-3 col-6">
<div class="row">
<div class="col-6">
<strong>Módulo:</strong>
</div>
<div class="col-6">
<span t-field="asistencia.erp_id" />
</div>
</div>
</div>
<div class="mb-3 col-6">
<div class="row">
<div class="col-6">
<strong>Sucursal:</strong>
</div>
<div class="col-6">
<span t-field="asistencia.warehouse_id" />
</div>
</div>
</div>
</div>
<div class="row"> <div class="row">
<div class="mb-3 col-6"> <div 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 respuesta:</strong> <strong>Fecha de respuesta:</strong>
...@@ -428,7 +407,7 @@ ...@@ -428,7 +407,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-6"> <div 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>
...@@ -440,7 +419,7 @@ ...@@ -440,7 +419,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="mb-3 col-6"> <div 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>Prioridad:</strong> <strong>Prioridad:</strong>
...@@ -450,7 +429,7 @@ ...@@ -450,7 +429,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-6"> <div 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>
...@@ -462,7 +441,7 @@ ...@@ -462,7 +441,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="mb-3 col-6"> <div 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>
...@@ -472,7 +451,7 @@ ...@@ -472,7 +451,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-6"> <div 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>
...@@ -484,7 +463,7 @@ ...@@ -484,7 +463,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="mb-3 col-6"> <div 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>Estado:</strong> <strong>Estado:</strong>
...@@ -494,7 +473,7 @@ ...@@ -494,7 +473,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-6"> <div 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>
...@@ -649,7 +628,7 @@ ...@@ -649,7 +628,7 @@
<div t-attf-class="#{'card-body' if report_type == 'html' else ''}"> <div t-attf-class="#{'card-body' if report_type == 'html' else ''}">
<div id="informations"> <div id="informations">
<div class="row"> <div class="row">
<div class="mb-3 col-6"> <div 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>Tipo de Ticket:</strong> <strong>Tipo de Ticket:</strong>
...@@ -659,7 +638,7 @@ ...@@ -659,7 +638,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-6"> <div 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>
...@@ -671,7 +650,7 @@ ...@@ -671,7 +650,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="mb-3 col-6"> <div 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>Última actualización:</strong> <strong>Última actualización:</strong>
...@@ -681,7 +660,7 @@ ...@@ -681,7 +660,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-6"> <div 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>Nombre:</strong> <strong>Nombre:</strong>
...@@ -693,7 +672,7 @@ ...@@ -693,7 +672,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="mb-3 col-6"> <div 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>Tipo de incidencia:</strong> <strong>Tipo de incidencia:</strong>
...@@ -703,7 +682,7 @@ ...@@ -703,7 +682,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-6"> <div 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>Correo electrónico:</strong> <strong>Correo electrónico:</strong>
...@@ -716,7 +695,7 @@ ...@@ -716,7 +695,7 @@
</div> </div>
<div class="row"> <div class="row">
<div class="mb-3 col-6"> <div 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 respuesta:</strong> <strong>Fecha de respuesta:</strong>
...@@ -726,7 +705,7 @@ ...@@ -726,7 +705,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-6"> <div 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>
...@@ -738,7 +717,7 @@ ...@@ -738,7 +717,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="mb-3 col-6"> <div 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>Prioridad:</strong> <strong>Prioridad:</strong>
...@@ -748,7 +727,7 @@ ...@@ -748,7 +727,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-6"> <div 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>
...@@ -760,7 +739,7 @@ ...@@ -760,7 +739,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="mb-3 col-6"> <div 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>
...@@ -770,7 +749,7 @@ ...@@ -770,7 +749,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-6"> <div 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>
...@@ -782,7 +761,7 @@ ...@@ -782,7 +761,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="mb-3 col-6"> <div 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>Estado:</strong> <strong>Estado:</strong>
...@@ -792,7 +771,7 @@ ...@@ -792,7 +771,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mb-3 col-6"> <div 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>
......
...@@ -114,7 +114,10 @@ ...@@ -114,7 +114,10 @@
<em class="font-weight-normal text-muted">Estado:</em> <em class="font-weight-normal text-muted">Estado:</em>
<span t-esc="ticket[0].stage_id.name" /> <span t-esc="ticket[0].stage_id.name" />
</th> </th>
<th t-if="groupby == 'category'">
<em class="font-weight-normal text-muted">Categoría:</em>
<span t-esc="ticket[0].category_id.name" />
</th>
<th t-if="groupby == 'priority'"> <th t-if="groupby == 'priority'">
<em class="font-weight-normal text-muted">Prioridad:</em> <em class="font-weight-normal text-muted">Prioridad:</em>
<span t-esc="ticket[0].priority.name" /> <span t-esc="ticket[0].priority.name" />
......
...@@ -58,8 +58,9 @@ ...@@ -58,8 +58,9 @@
<h5>Seleccione su tipo de ticket:</h5> <h5>Seleccione su tipo de ticket:</h5>
</div> </div>
<div class="form-group"> <div class="form-group">
<a id="supportButton" class="btn btn-primary" data-toggle="collapse" href="#collapseSupport" role="buton" aria-expanded="false" aria-controls="collapseSupport">Soporte</a> <a id="supportButton" class="btn btn-primary" data-toggle="collapse" href="#collapseSupport" role="buton" aria-expanded="false" aria-controls="collapseSupport" >Soporte</a>
<a id="improveButton" class="btn btn-primary" data-toggle="collapse" href="#collapseImprove" role="buton" aria-expanded="false" aria-controls="collapseImprove">Mejora</a> <a id="improveButton" class="btn btn-primary" data-toggle="collapse" href="#collapseImprove" role="buton" aria-expanded="false" aria-controls="collapseImprove" >Mejora</a>
<a id="reportButton" class="btn btn-primary" data-toggle="collapse" href="#collapseImprove" role="buton" aria-expanded="false" aria-controls="collapseImprove" >Reporte</a>
</div> </div>
<input type="hidden" name="portal_erp_type" id="portal_erp_type" required="True"/> <input type="hidden" name="portal_erp_type" id="portal_erp_type" required="True"/>
...@@ -108,12 +109,46 @@ ...@@ -108,12 +109,46 @@
<div class="form-group"> <div class="form-group">
<a href="/helpdesk_morsa/static/src/docs/TI-FOR-04_Solicitud_de_Mejora_rev02.xlsx">Descargar solicutd de mejora</a> <a href="/helpdesk_morsa/static/src/docs/TI-FOR-04_Solicitud_de_Mejora_rev02.xlsx">Descargar solicutd de mejora</a>
</div> </div>
<div t-attf-class="form-group o_website_form_required_custom #{error and 'portal_route' in error and 'has-error' or ''}">
<label class="control-label" for="portal_route">Ruta de la transacción:</label>
<input type="text" class="form-control form-field s_website_form_required" id="portal_route" name="portal_route" />
</div>
<div t-attf-class="form-group o_website_form_required_custom #{error and 'portal_process' in error and 'has-error' or ''}">
<label class="control-label" for="portal_process">¿En que proceso utilizas la transacción?</label>
<input type="text" class="form-control form-field s_website_form_required" id="portal_process" name="portal_process" />
</div>
<div t-attf-class="form-group o_website_form_required_custom #{error and 'portal_validations' in error and 'has-error' or ''}">
<label class="control-label" for="portal_validations">Cuales son las validaciones que se requieren</label>
<input type="text" class="form-control form-field s_website_form_required" id="portal_validations" name="portal_validations" />
</div>
<div t-attf-class="form-group o_website_form_required_custom #{error and 'portal_essenary' in error and 'has-error' or ''}">
<label class="control-label" for="portal_scenery">¿Qué escenarios son comunes a trabajar con esta transacción?</label>
<input type="text" class="form-control form-field s_website_form_required" id="portal_scenery" name="portal_scenery" />
</div>
<div t-attf-class="form-group o_website_form_required_custom #{error and 'portal_impact' in error and 'has-error' or ''}">
<label class="control-label" for="portal_impact">¿Tu solicitud, impacta de algún modo a algún otro Módulo?</label>
<input type="text" class="form-control form-field s_website_form_required" id="portal_impact" name="portal_impact"/>
</div>
<div t-attf-class="form-group o_website_form_required_custom #{error and 'portal_module' in error and 'has-error' or ''}">
<label class="control-label" for="portal_module_improve">Módulo:</label>
<select class="form-control form-field o_website_form_required_custom" id="portal_module_improve" name="portal_module_improve">
<option></option>
<t t-foreach="request.env['erp.modules'].sudo().search([])" t-as="module">
<option t-att-value="module.id"><t t-esc="module.name" /></option>
</t>
</select>
</div>
<div name="portal_file_container" t-attf-class="form-group #{error and 'portal_file' in error and 'has-error' or ''}"> <div name="portal_file_container" t-attf-class="form-group #{error and 'portal_file' in error and 'has-error' or ''}">
<label class="control-label" for="portal_file_mejora">Adjuntos:</label> <label class="control-label" for="portal_file_mejora">Adjuntos:</label>
<label class="custom-file"> <label class="custom-file">
<input name="portal_file_mejora" id="portal_file_mejora" type="file" multiple="multiple" accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"/> <input name="portal_file_mejora" id="portal_file_mejora" type="file" multiple="multiple" />
<span class="custom-file-control" /> <span class="custom-file-control" />
</label> </label>
</div> </div>
...@@ -157,6 +192,10 @@ ...@@ -157,6 +192,10 @@
<em class="font-weight-normal text-muted">Estado:</em> <em class="font-weight-normal text-muted">Estado:</em>
<span t-esc="ticket[0].stage_id.name" /> <span t-esc="ticket[0].stage_id.name" />
</th> </th>
<th t-if="groupby == 'category'">
<em class="font-weight-normal text-muted">Categoría:</em>
<span t-esc="ticket[0].category_id.name" />
</th>
<th t-if="groupby == 'priority'"> <th t-if="groupby == 'priority'">
<em class="font-weight-normal text-muted">Prioridad:</em> <em class="font-weight-normal text-muted">Prioridad:</em>
<span t-esc="ticket[0].priority.name" /> <span t-esc="ticket[0].priority.name" />
...@@ -165,9 +204,18 @@ ...@@ -165,9 +204,18 @@
<em class="font-weight-normal text-muted">Estado de respuesta:</em> <em class="font-weight-normal text-muted">Estado de respuesta:</em>
<span t-esc="ticket[0].state" /> <span t-esc="ticket[0].state" />
</th> </th>
<th t-if="groupby == 'sucursal'">
<em class="font-weight-normal text-muted">Sucursal:</em>
<span t-esc="ticket[0].warehouse_id.name" />
</th>
<th t-if="groupby == 'modulo'">
<em class="font-weight-normal text-muted">Módulo:</em>
<span t-esc="ticket[0].erp_id.name" />
</th>
<th>Fecha de creación</th> <th>Fecha de creación</th>
<th>Última actualización</th> <th>Última actualización</th>
<th>Tipo de Ticket</th> <th>Módulo</th>
<th>Sucursal</th>
<th>Estado</th> <th>Estado</th>
</tr> </tr>
</thead> </thead>
...@@ -182,7 +230,8 @@ ...@@ -182,7 +230,8 @@
</td> </td>
<td><span t-field="t.create_date" t-options='{"widget": "date"}' /></td> <td><span t-field="t.create_date" t-options='{"widget": "date"}' /></td>
<td><span t-field="t.write_date" t-options='{"widget": "date"}' /></td> <td><span t-field="t.write_date" t-options='{"widget": "date"}' /></td>
<td><span t-field="t.ticket_type" /></td> <td><span t-field="t.erp_id" /></td>
<td><span t-field="t.warehouse_id" /></td>
<td><span t-field="t.stage_id" /></td> <td><span t-field="t.stage_id" /></td>
</tr> </tr>
</t> </t>
......
...@@ -98,7 +98,10 @@ ...@@ -98,7 +98,10 @@
<em class="font-weight-normal text-muted">Estado:</em> <em class="font-weight-normal text-muted">Estado:</em>
<span t-esc="ticket[0].stage_id.name" /> <span t-esc="ticket[0].stage_id.name" />
</th> </th>
<th t-if="groupby == 'category'">
<em class="font-weight-normal text-muted">Categoría:</em>
<span t-esc="ticket[0].category_id.name" />
</th>
<th t-if="groupby == 'priority'"> <th t-if="groupby == 'priority'">
<em class="font-weight-normal text-muted">Prioridad:</em> <em class="font-weight-normal text-muted">Prioridad:</em>
<span t-esc="ticket[0].priority.name" /> <span t-esc="ticket[0].priority.name" />
...@@ -107,9 +110,10 @@ ...@@ -107,9 +110,10 @@
<em class="font-weight-normal text-muted">Estatus de Respuesta:</em> <em class="font-weight-normal text-muted">Estatus de Respuesta:</em>
<span t-esc="ticket[0].state" /> <span t-esc="ticket[0].state" />
</th> </th>
<th>Fecha de creación</th> <th>Fecha de creación</th>
<th>Última actualización</th> <th>Última actualización</th>
<th>Tipo de Ticket</th> <th>Categoría</th>
<th>Estado</th> <th>Estado</th>
</tr> </tr>
</thead> </thead>
...@@ -122,9 +126,9 @@ ...@@ -122,9 +126,9 @@
<em t-else="">Ticket</em> <em t-else="">Ticket</em>
</a> </a>
</td> </td>
<td><span t-field="t.create_date" t-options='{"widget": "date"}' /></td> <td><span t-field="t.create_date" /></td>
<td><span t-field="t.write_date" t-options='{"widget": "date"}' /></td> <td><span t-field="t.write_date" t-options='{"widget": "date"}' /></td>
<td><span t-field="t.ticket_type" /></td> <td><span t-field="t.category_id" /></td>
<td><span t-field="t.stage_id" /></td> <td><span t-field="t.stage_id" /></td>
</tr> </tr>
</t> </t>
......
from . import models from . import models
from . import controllers from . import controllers
from . import models \ No newline at end of file
\ No newline at end of file
...@@ -9,8 +9,15 @@ ...@@ -9,8 +9,15 @@
"summary":"Cambio de contraseña", "summary":"Cambio de contraseña",
"description":"""Actualización de contraseña a odoo""", "description":"""Actualización de contraseña a odoo""",
"version":"15.0.34", "version":"15.0.34",
"depends": ["base","web",], "depends": [
"data": ['views/res_company.xml'], "base",
"web",
"sh_all_in_one_helpdesk",
],
"data": [
'views/res_company.xml',
'views/res_users.xml'
],
"application":False, "application":False,
"auto_install":False, "auto_install":False,
"installable":True, "installable":True,
......
...@@ -16,11 +16,15 @@ class HomeInherit(Home): ...@@ -16,11 +16,15 @@ class HomeInherit(Home):
@http.route('/web/login', type='http', auth="none") @http.route('/web/login', type='http', auth="none")
def web_login(self, redirect=None, **kw): def web_login(self, redirect=None, **kw):
if 'login' in kw and 'password' in kw: if 'login' in kw and 'password' in kw:
uid = self.auth_user_rpc(kw['login'],kw['password']) usr = request.env['res.users'].sudo().search([('login','=',kw['login'])],limit=1)
if uid != 0: if usr.verification_odoo:
return super(HomeInherit, self).web_login(redirect=redirect, **kw) uid = self.auth_user_rpc(kw['login'],kw['password'])
if uid != 0:
return super(HomeInherit, self).web_login(redirect=redirect, **kw)
else:
return request.redirect('/web/login?error=access')
else: else:
return request.redirect('/web/login?error=access') return super(HomeInherit, self).web_login(redirect=redirect, **kw)
else: else:
return super(HomeInherit, self).web_login(redirect=redirect, **kw) return super(HomeInherit, self).web_login(redirect=redirect, **kw)
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from odoo import api, fields, models
import logging import logging
from odoo import api, fields, models, tools, SUPERUSER_ID, _, Command
_logger = logging.getLogger(__name__) _logger = logging.getLogger(__name__)
class ResUsersInherit(models.Model): class ResUsersInherit(models.Model):
_inherit = 'res.users' _inherit = 'res.users'
password_saved = fields.Char('') verification_odoo = fields.Boolean('Verificación de Usuario')
def change_password_api(self,login,new_passwd): """def change_password_api(self,login,new_password):
res = {"res":200,"message":"Actualización completa"} res = {"res":200,"message":"Actualización completa"}
usr = self.env['res.users'].search([('login','=',login)]) user = self.env['res.users'].sudo().search([('login','=',login)])
if usr and new_passwd: if user:
usr.sudo().write({'password':new_passwd}) user.sudo().write({'password':new_password})
else: else:
res = {"res":400,"message":"Fallida"} res = {"res":400,"message":"Fallida"}
return res return res
"""
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record model="ir.ui.view" id="res_users_form_inherit_verification">
<field name="name">res.users.form.inherit.verification</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="sh_all_in_one_helpdesk.sh_res_users_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='sh_portal_user']" position="before">
<field name="verification_odoo"/>
</xpath>
</field>
</record>
</data>
</odoo>
\ No newline at end of file
...@@ -40,12 +40,12 @@ ...@@ -40,12 +40,12 @@
<tbody> <tbody>
<td valign="top" style="font-family:Arial,Helvetica,sans-serif; color: #555; font-size: 14px;"> <td valign="top" style="font-family:Arial,Helvetica,sans-serif; color: #555; font-size: 14px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;"> <p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear Estimado/a
<t t-out="object.partner_id.name" /> <t t-out="object.partner_id.name" />
We received your request. Hemos recibido tu solicitud.
<br /> <br />
<br /> <br />
Our Support Team will contact you as soon as possible. Nuestro equipo te contactará tan pronto les sea posible.
<br /> <br />
<br /> <br />
<br /> <br />
...@@ -138,11 +138,11 @@ ...@@ -138,11 +138,11 @@
<tbody> <tbody>
<td valign="top" style="font-family:Arial,Helvetica,sans-serif; color: #555; font-size: 14px;"> <td valign="top" style="font-family:Arial,Helvetica,sans-serif; color: #555; font-size: 14px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;"> <p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear Estimado/a
<t t-out="object.partner_id.name" /> <t t-out="object.partner_id.name" />
<br /> <br />
<br /> <br />
As your request we have resolved your ticket. Tu ticket ha sido resuelto.
<br /> <br />
<br /> <br />
<br /> <br />
...@@ -236,12 +236,12 @@ ...@@ -236,12 +236,12 @@
<tbody> <tbody>
<td valign="top" style="font-family:Arial,Helvetica,sans-serif; color: #555; font-size: 14px;"> <td valign="top" style="font-family:Arial,Helvetica,sans-serif; color: #555; font-size: 14px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;"> <p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear Estimado/a
<t t-out="object.partner_id.name" /> <t t-out="object.partner_id.name" />
, ,
<br /> <br />
<br /> <br />
Your ticket is cancelled for now based on some technical issue. Tu ticket ha sido cancelado.
<br /> <br />
<br /> <br />
<br /> <br />
...@@ -332,12 +332,12 @@ ...@@ -332,12 +332,12 @@
<tbody> <tbody>
<td valign="top" style="font-family:Arial,Helvetica,sans-serif; color: #555; font-size: 14px;"> <td valign="top" style="font-family:Arial,Helvetica,sans-serif; color: #555; font-size: 14px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;"> <p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear Estimado/a
<t t-out="object.partner_id.name" /> <t t-out="object.partner_id.name" />
Your ticket is Re-opened, Tu ticket ha sido reabierto,
<br /> <br />
<br /> <br />
We will follow-up as soon as possible. Le daremos seguimiento, tan pronto sea posible.
<br /> <br />
<br /> <br />
<br /> <br />
...@@ -424,10 +424,10 @@ ...@@ -424,10 +424,10 @@
<tbody> <tbody>
<td valign="top" style="font-family:Arial,Helvetica,sans-serif; color: #555; font-size: 14px;"> <td valign="top" style="font-family:Arial,Helvetica,sans-serif; color: #555; font-size: 14px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;"> <p style="margin: 0px; padding: 0px; font-size: 13px;">
We Have received new ticket from customer. Hemos recibido un ticket de un usuario.
<br /> <br />
<br /> <br />
Please take a follow-up as soon as possible. Favor de atenderlo tan pronto sea posible.
<br /> <br />
<br /> <br />
<br /> <br />
...@@ -516,12 +516,12 @@ ...@@ -516,12 +516,12 @@
<tbody> <tbody>
<td valign="top" style="font-family:Arial,Helvetica,sans-serif; color: #555; font-size: 14px;"> <td valign="top" style="font-family:Arial,Helvetica,sans-serif; color: #555; font-size: 14px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;"> <p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear, Estimado/a,
<t t-out="object.partner_id.name" /> <t t-out="object.partner_id.name" />
<br /> <br />
<br /> <br />
Your Ticket is working on we will contact you soon. Estamos trabajando en tu ticket, te contactaremos en caso de ser necesario.
<br /> <br />
<br /> <br />
<br /> <br />
...@@ -613,15 +613,16 @@ ...@@ -613,15 +613,16 @@
<tbody> <tbody>
<td valign="top" style="font-family:Arial,Helvetica,sans-serif; color: #555; font-size: 14px;"> <td valign="top" style="font-family:Arial,Helvetica,sans-serif; color: #555; font-size: 14px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;"> <p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear Estimado/a
<t t-out="object.partner_id.name" /> <t t-out="object.partner_id.name" />
, ,
<br /> <br />
<br /> <br />
Your Ticket is closed for now, if you want to Re-open your ticket please give your reply. Tu ticket ha sido cerrado, if quieres reabrir tu ticket comunicate con el asistente de soporte.
<br /> <br />
<br /> <br />
We would like to get your feedback on the support. Nos gustaría que nos dieras tu retroalimentación de tu ticket.
<br /> <br />
<br /> <br />
<br /> <br />
...@@ -689,19 +690,19 @@ ...@@ -689,19 +690,19 @@
<div style="margin: 0px; padding: 0px;"> <div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;"> <p style="margin: 0px; padding: 0px; font-size: 13px;">
<div style="list-style-type: none;"> <div style="list-style-type: none;">
Dear Estomado/a
<t t-out="object.partner_id.name" /> <t t-out="object.partner_id.name" />
,%0A%0A ,%0A%0A
Here is the your Ticket * Aquí esta tu ticket *
<t t-out="object.name" /> <t t-out="object.name" />
* *
from de
<t t-out="object.company_id.name" /> <t t-out="object.company_id.name" />
%0A%0A %0A%0A
<t t-if="object.company_id.sh_ticket_product_detail"> <t t-if="object.company_id.sh_ticket_product_detail">
<t t-if="object.product_ids"> <t t-if="object.product_ids">
<span style="list-style-type: none;"> <span style="list-style-type: none;">
*Following is your product details*.%0A%0A *Aqui se encuentras los detalles del producto*.%0A%0A
</span> </span>
%for line in object.product_ids: %for line in object.product_ids:
<t t-foreach="object.product_ids" t-as="line"> <t t-foreach="object.product_ids" t-as="line">
...@@ -715,7 +716,7 @@ ...@@ -715,7 +716,7 @@
<br /> <br />
<t t-if="object.company_id.sh_pdf_in_message"> <t t-if="object.company_id.sh_pdf_in_message">
<span style="list-style-type: none;"> <span style="list-style-type: none;">
*Click here to download Ticket Document* %20 : *Da click aquí para descargar tu documento* %20 :
<t t-out="object.sh_ticket_report_url" /> <t t-out="object.sh_ticket_report_url" />
%0A%0A %0A%0A
</span> </span>
...@@ -724,7 +725,7 @@ ...@@ -724,7 +725,7 @@
<t t-if="object.company_id.sh_ticket_url_in_message"> <t t-if="object.company_id.sh_ticket_url_in_message">
<span style="list-style-type: none;"> <span style="list-style-type: none;">
*Click here to See Ticket History* %20 : *Da click aquí para revisar tu historia* %20 :
<t t-out="object.portal_ticket_url_wp" /> <t t-out="object.portal_ticket_url_wp" />
%0A%0A %0A%0A
</span> </span>
......
...@@ -10,6 +10,10 @@ from odoo.tools import email_re ...@@ -10,6 +10,10 @@ from odoo.tools import email_re
import uuid import uuid
from odoo.exceptions import ValidationError from odoo.exceptions import ValidationError
import logging
_logger = logging.getLogger(__name__)
class HelpdeskSLAStatus(models.Model): class HelpdeskSLAStatus(models.Model):
_name = 'sh.helpdesk.sla.status' _name = 'sh.helpdesk.sla.status'
...@@ -1287,9 +1291,8 @@ class HelpdeskTicket(models.Model): ...@@ -1287,9 +1291,8 @@ class HelpdeskTicket(models.Model):
email_values = { email_values = {
'email_from': self.company_id.email_formatted, 'email_to': self.partner_id.email} 'email_from': self.company_id.email_formatted, 'email_to': self.partner_id.email}
template.sudo().send_mail(self.id, force_send=True, email_values=email_values) template.sudo().send_mail(self.id, force_send=True, email_values=email_values)
self.stage_id = self.company_id.done_stage_id.id self.stage_id = self.company_id.done_stage_id.id
def action_reply(self): def action_reply(self):
self.ensure_one() self.ensure_one()
......
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