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 @@
'views/odoo/helpdesk_ticket.xml',
'views/odoo/helpdesk_team.xml',
'views/odoo/helpdesk_warehouse.xml',
'views/odoo/erp_system.xml',
'views/odoo/helpdesk_module.xml',
'views/odoo/helpdesk_reason.xml',
'views/odoo/res_users.xml',
......
......@@ -20,8 +20,6 @@ class WebsiteTickets(DownloadReport):
@http.route('/helpdesk/ticket/feedback/<ticket_id>', type="http", auth="public", website=True, csrf=False)
def helpdesk_ticket_feedback_thanks(self, ticket_id, **kw):
_logger.info('Entra custom')
_logger.info(kw)
dic = {}
if kw.get('problem_solved') == 'True':
dic.update({
......@@ -57,7 +55,6 @@ class WebsiteTickets(DownloadReport):
dic.update({
'customer_comment': kw.get('comment'),
})
_logger.info(dic)
ticket = request.env['helpdesk.ticket'].sudo().search(
[('id', '=', int(ticket_id))], limit=1)
if ticket:
......
......@@ -82,7 +82,7 @@ class PortalHelpdeskMorsaEmergency(PortalHelpdesk):
return domain
@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()
HelpdeskTicket = request.env['helpdesk.ticket'].sudo()
#domain = self.prepare_portal_layout_911()
......@@ -104,42 +104,23 @@ class PortalHelpdeskMorsaEmergency(PortalHelpdesk):
}
searchbar_groupby = {
'create_by': {
'input': 'create_by',
'label': _('Created By')
},
'ticket_type': {
'input': 'ticket_type',
'label': _('Ticket Type')
},
'status': {
'input': 'status',
'label': _('Status')
},
'customer': {
'input': 'customer',
'label': _('Customer')
},
'category': {
'input': 'category',
'label': _('Category')
},
'subcategory': {
'input': 'subcategory',
'label': _('Sub Category')
},
'subject': {
'input': 'subject',
'label': _('Subject')
},
'priority': {
'input': 'priority',
'label': _('Priority')
},
'state': {
'input': 'state',
'label': _('Reply Status')
},
}
#domain = self._prepare_portal_layout_911()
today = fields.Date.today()
......
......@@ -82,7 +82,7 @@ class PortalHelpdeskMorsaErp(PortalHelpdesk):
return domain
@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()
HelpdeskTicket = request.env['helpdesk.ticket'].sudo()
#domain = self._prepare_portal_layout_erp_asistence()
......@@ -104,42 +104,32 @@ class PortalHelpdeskMorsaErp(PortalHelpdesk):
}
searchbar_groupby = {
'create_by': {
'input': 'create_by',
'label': _('Created By')
},
'ticket_type': {
'input': 'ticket_type',
'label': _('Ticket Type')
},
'status': {
'input': 'status',
'label': _('Status')
},
'customer': {
'input': 'customer',
'label': _('Customer')
},
'category': {
'input': 'category',
'label': _('Category')
},
'subcategory': {
'input': 'subcategory',
'label': _('Sub Category')
},
'subject': {
'input': 'subject',
'label': _('Subject')
},
'priority': {
'input': 'priority',
'label': _('Priority')
},
'state': {
'input': 'state',
'label': _('Reply Status')
'sucursal':{
'input': 'sucursal',
'label': _('Sucursal')
},
'modulo':{
'input': 'modulo',
'label': _('Módulo')
}
}
today = fields.Date.today()
......@@ -264,7 +254,7 @@ class PortalHelpdeskMorsaErp(PortalHelpdesk):
domain = AND([domain, ticket_domain])
# 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 = 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':
......@@ -285,6 +275,10 @@ class PortalHelpdeskMorsaErp(PortalHelpdesk):
order = "priority, %s" % order
elif groupby == 'state':
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'])
......@@ -334,6 +328,16 @@ class PortalHelpdeskMorsaErp(PortalHelpdesk):
HelpdeskTicket.concat(*g)
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
values.update({
'created':ctr,
......@@ -421,11 +425,36 @@ class PortalHelpdeskMorsaErp(PortalHelpdesk):
ticket_dic.update({
'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':
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:
return json.dumps({"resp":"Error","message":"Es necesario agregar la archivos"})
else:
......
......@@ -84,7 +84,7 @@ class PortalHelpdeskMorsaSoporte(PortalHelpdesk):
@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()
HelpdeskTicket = request.env['helpdesk.ticket'].sudo()
#domain = self._prepare_technial_support()
......@@ -106,42 +106,23 @@ class PortalHelpdeskMorsaSoporte(PortalHelpdesk):
}
searchbar_groupby = {
'create_by': {
'input': 'create_by',
'label': _('Created By')
},
'ticket_type': {
'input': 'ticket_type',
'label': _('Ticket Type')
},
'status': {
'input': 'status',
'label': _('Status')
},
'customer': {
'input': 'customer',
'label': _('Customer')
},
'category': {
'input': 'category',
'label': _('Category')
},
'subcategory': {
'input': 'subcategory',
'label': _('Sub Category')
},
'subject': {
'input': 'subject',
'label': _('Subject')
},
'priority': {
'input': 'priority',
'label': _('Priority')
},
'state': {
'input': 'state',
'label': _('Reply Status')
},
}
today = fields.Date.today()
......@@ -363,7 +344,7 @@ class PortalHelpdeskMorsaSoporte(PortalHelpdesk):
@http.route('/portal-create-ticket-soporte', type='http', auth='public',csrf=False)
def portal_create_ticket_support(self, **kw):
try:
_logger.info(kw)
login_user = request.env.user
if login_user and login_user.login != 'public':
partner_id = False
......
from . import ticket_reason
from . import warehouse_helpdesk
from . import erp_module
from . import erp_system
from . import region_helpdesk
from . import res_users
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__)
class HelpdeskTicket(models.Model):
_inherit = 'helpdesk.ticket'
erp_id = fields.Many2one('erp.modules','ERP')
erp_id = fields.Many2one('erp.modules','Módulo')
incidence_type = fields.Selection([
('odoo', 'Falla Odoo Nacional'),
('mclick','Falla Morsa Click Nacional'),
......@@ -24,7 +24,7 @@ class HelpdeskTicket(models.Model):
call_before_10 = fields.Boolean('Atención antes de 10 minutos')
color = fields.Integer('Color',compute="_get_color")
erp_type = fields.Selection([
('soporte','Soporte'),('mejora','Mejora')
('soporte','Soporte'),('mejora','Mejora'),('reporte','Reporte')
],string="Tipo de asistencia")
ticket_reason = fields.Many2one('ticket.reason','Motivo de Ticket',
default=lambda self: self.env['ticket.reason'].search([('name','=','Ninguno'),],limit=1).id
......@@ -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_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")
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):
in_progress_stage = self.env.ref('sh_all_in_one_helpdesk.in_progress_stage').id
......@@ -52,7 +60,7 @@ class HelpdeskTicket(models.Model):
for rec in self:
if rec.team_head:
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]:
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]:
......@@ -315,7 +323,7 @@ class HelpdeskTicket(models.Model):
if "stage_id" in vals:
if self.description == '<p><br></p>' or self.description==False:
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'))
if len(vals['description'])-11 < min_description:
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
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
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_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
......
......@@ -16,4 +16,6 @@
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 @@
<field name="is_emergency" invisible="1"/>
</xpath>
<xpath expr="//field[@name='priority']" position="after">
<field name="system_id" attrs="{'invisible':[('is_support', '=', False),('is_erp', '=', False),('is_emergency', '=', False)]}"/>
<field name="erp_type" widget="radio" attrs="{'invisible':[('is_erp', '=', False)]}" options="{'horizontal': true}"/>
<field name="erp_id" attrs="{'invisible':[('is_erp', '=', False)]}"/>
<field name="warehouse_id" attrs="{'invisible':[('is_erp', '=', False)]}"/>
<field name="module_route" attrs="{'invisible':[('is_erp', '=', False),('erp_type','in',['mejora','reporte'])]}"/>
<field name="process_text" attrs="{'invisible':[('is_erp', '=', False),('erp_type','in',['mejora','reporte'])]}"/>
<field name="required_validation" attrs="{'invisible':[('is_erp', '=', False),('erp_type','in',['mejora','reporte'])]}"/>
<field name="common_scenery" attrs="{'invisible':[('is_erp', '=', False),('erp_type','in',['mejora','reporte'])]}"/>
<field name="module_impact" attrs="{'invisible':[('is_erp', '=', False),('erp_type','in',['mejora','reporte'])]}"/>
<field name="incidence_type" attrs="{'invisible':[('is_emergency', '=', False)]}"/>
</xpath>
<xpath expr="//header" position="replace">
<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_reply" type="object" string="Respuesta" class="oe_highlight"/>
<button name="action_done" type="object" string="Resolver Ticket" class="oe_highlight" attrs="{'invisible':[('done_button_boolean','=',False)]}"/>
<button name="action_closed" type="object" string="Cerrar Ticket" class="oe_highlight" attrs="{'invisible':[('done_stage_boolean','=',False)]}"/>
<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_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_open" type="object" string="Re-Abrir Ticket" class="oe_highlight" attrs="{'invisible':[('open_boolean','=',False)]}"/>
<button name="preview_ticket" type="object" string="Vista previa"/>
......@@ -39,9 +45,9 @@
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='customer_comment']" position="before">
<field name="problem_solved_on_time"/>
<field name="good_service_actitude"/>
<field name="begin_before_ten_min"/>
<field name="problem_solved_on_time" readonly="1"/>
<field name="good_service_actitude" readonly="1"/>
<field name="begin_before_ten_min" readonly="1"/>
</xpath>
<xpath expr="//field[@name='sub_category_id']" position="after">
<field name="ticket_reason" attrs="{'invisible':['|','|',('is_support', '=', True),('is_erp','=',False),('is_emergency','=',False)]}"/>
......@@ -53,6 +59,18 @@
<xpath expr="//field[@name='sh_user_ids']" position="after">
<field name="team_members" widget="many2manytags" invisible="1"/>
</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>
</record>
......
......@@ -16,10 +16,10 @@
<t t-set="background" t-value="'/helpdesk_morsa/static/src/img/support_back.svg'"/>
</t>
<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="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="background" t-value="'/helpdesk_morsa/static/src/img/erp_back.svg'"/>
</t>
......
......@@ -114,7 +114,10 @@
<em class="font-weight-normal text-muted">Estado:</em>
<span t-esc="ticket[0].stage_id.name" />
</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'">
<em class="font-weight-normal text-muted">Prioridad:</em>
<span t-esc="ticket[0].priority.name" />
......
......@@ -58,8 +58,9 @@
<h5>Seleccione su tipo de ticket:</h5>
</div>
<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="improveButton" class="btn btn-primary" data-toggle="collapse" href="#collapseImprove" role="buton" aria-expanded="false" aria-controls="collapseImprove">Mejora</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="reportButton" class="btn btn-primary" data-toggle="collapse" href="#collapseImprove" role="buton" aria-expanded="false" aria-controls="collapseImprove" >Reporte</a>
</div>
<input type="hidden" name="portal_erp_type" id="portal_erp_type" required="True"/>
......@@ -108,12 +109,46 @@
<div class="form-group">
<a href="/helpdesk_morsa/static/src/docs/TI-FOR-04_Solicitud_de_Mejora_rev02.xlsx">Descargar solicutd de mejora</a>
</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 ''}">
<label class="control-label" for="portal_file_mejora">Adjuntos:</label>
<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" />
</label>
</div>
......@@ -157,6 +192,10 @@
<em class="font-weight-normal text-muted">Estado:</em>
<span t-esc="ticket[0].stage_id.name" />
</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'">
<em class="font-weight-normal text-muted">Prioridad:</em>
<span t-esc="ticket[0].priority.name" />
......@@ -165,9 +204,18 @@
<em class="font-weight-normal text-muted">Estado de respuesta:</em>
<span t-esc="ticket[0].state" />
</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>Última actualización</th>
<th>Tipo de Ticket</th>
<th>Módulo</th>
<th>Sucursal</th>
<th>Estado</th>
</tr>
</thead>
......@@ -182,7 +230,8 @@
</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.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>
</tr>
</t>
......
......@@ -98,7 +98,10 @@
<em class="font-weight-normal text-muted">Estado:</em>
<span t-esc="ticket[0].stage_id.name" />
</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'">
<em class="font-weight-normal text-muted">Prioridad:</em>
<span t-esc="ticket[0].priority.name" />
......@@ -107,9 +110,10 @@
<em class="font-weight-normal text-muted">Estatus de Respuesta:</em>
<span t-esc="ticket[0].state" />
</th>
<th>Fecha de creación</th>
<th>Última actualización</th>
<th>Tipo de Ticket</th>
<th>Categoría</th>
<th>Estado</th>
</tr>
</thead>
......@@ -122,9 +126,9 @@
<em t-else="">Ticket</em>
</a>
</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.ticket_type" /></td>
<td><span t-field="t.category_id" /></td>
<td><span t-field="t.stage_id" /></td>
</tr>
</t>
......
from . import models
from . import controllers
from . import models
\ No newline at end of file
from . import controllers
\ No newline at end of file
......@@ -9,8 +9,15 @@
"summary":"Cambio de contraseña",
"description":"""Actualización de contraseña a odoo""",
"version":"15.0.34",
"depends": ["base","web",],
"data": ['views/res_company.xml'],
"depends": [
"base",
"web",
"sh_all_in_one_helpdesk",
],
"data": [
'views/res_company.xml',
'views/res_users.xml'
],
"application":False,
"auto_install":False,
"installable":True,
......
......@@ -16,11 +16,15 @@ class HomeInherit(Home):
@http.route('/web/login', type='http', auth="none")
def web_login(self, redirect=None, **kw):
if 'login' in kw and 'password' in kw:
uid = self.auth_user_rpc(kw['login'],kw['password'])
if uid != 0:
return super(HomeInherit, self).web_login(redirect=redirect, **kw)
usr = request.env['res.users'].sudo().search([('login','=',kw['login'])],limit=1)
if usr.verification_odoo:
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:
return request.redirect('/web/login?error=access')
return super(HomeInherit, self).web_login(redirect=redirect, **kw)
else:
return super(HomeInherit, self).web_login(redirect=redirect, **kw)
......
# -*- coding: utf-8 -*-
from odoo import api, fields, models
import logging
from odoo import api, fields, models, tools, SUPERUSER_ID, _, Command
_logger = logging.getLogger(__name__)
class ResUsersInherit(models.Model):
_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"}
usr = self.env['res.users'].search([('login','=',login)])
if usr and new_passwd:
usr.sudo().write({'password':new_passwd})
user = self.env['res.users'].sudo().search([('login','=',login)])
if user:
user.sudo().write({'password':new_password})
else:
res = {"res":400,"message":"Fallida"}
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 @@
<tbody>
<td valign="top" style="font-family:Arial,Helvetica,sans-serif; color: #555; font-size: 14px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear
Estimado/a
<t t-out="object.partner_id.name" />
We received your request.
Hemos recibido tu solicitud.
<br />
<br />
Our Support Team will contact you as soon as possible.
Nuestro equipo te contactará tan pronto les sea posible.
<br />
<br />
<br />
......@@ -138,11 +138,11 @@
<tbody>
<td valign="top" style="font-family:Arial,Helvetica,sans-serif; color: #555; font-size: 14px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear
Estimado/a
<t t-out="object.partner_id.name" />
<br />
<br />
As your request we have resolved your ticket.
Tu ticket ha sido resuelto.
<br />
<br />
<br />
......@@ -236,12 +236,12 @@
<tbody>
<td valign="top" style="font-family:Arial,Helvetica,sans-serif; color: #555; font-size: 14px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear
Estimado/a
<t t-out="object.partner_id.name" />
,
<br />
<br />
Your ticket is cancelled for now based on some technical issue.
Tu ticket ha sido cancelado.
<br />
<br />
<br />
......@@ -332,12 +332,12 @@
<tbody>
<td valign="top" style="font-family:Arial,Helvetica,sans-serif; color: #555; font-size: 14px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear
Estimado/a
<t t-out="object.partner_id.name" />
Your ticket is Re-opened,
Tu ticket ha sido reabierto,
<br />
<br />
We will follow-up as soon as possible.
Le daremos seguimiento, tan pronto sea posible.
<br />
<br />
<br />
......@@ -424,10 +424,10 @@
<tbody>
<td valign="top" style="font-family:Arial,Helvetica,sans-serif; color: #555; font-size: 14px;">
<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 />
Please take a follow-up as soon as possible.
Favor de atenderlo tan pronto sea posible.
<br />
<br />
<br />
......@@ -516,12 +516,12 @@
<tbody>
<td valign="top" style="font-family:Arial,Helvetica,sans-serif; color: #555; font-size: 14px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear,
Estimado/a,
<t t-out="object.partner_id.name" />
<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 />
......@@ -613,15 +613,16 @@
<tbody>
<td valign="top" style="font-family:Arial,Helvetica,sans-serif; color: #555; font-size: 14px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear
Estimado/a
<t t-out="object.partner_id.name" />
,
<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 />
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 />
......@@ -689,19 +690,19 @@
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
<div style="list-style-type: none;">
Dear
Estomado/a
<t t-out="object.partner_id.name" />
,%0A%0A
Here is the your Ticket *
Aquí esta tu ticket *
<t t-out="object.name" />
*
from
de
<t t-out="object.company_id.name" />
%0A%0A
<t t-if="object.company_id.sh_ticket_product_detail">
<t t-if="object.product_ids">
<span style="list-style-type: none;">
*Following is your product details*.%0A%0A
*Aqui se encuentras los detalles del producto*.%0A%0A
</span>
%for line in object.product_ids:
<t t-foreach="object.product_ids" t-as="line">
......@@ -715,7 +716,7 @@
<br />
<t t-if="object.company_id.sh_pdf_in_message">
<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" />
%0A%0A
</span>
......@@ -724,7 +725,7 @@
<t t-if="object.company_id.sh_ticket_url_in_message">
<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" />
%0A%0A
</span>
......
......@@ -10,6 +10,10 @@ from odoo.tools import email_re
import uuid
from odoo.exceptions import ValidationError
import logging
_logger = logging.getLogger(__name__)
class HelpdeskSLAStatus(models.Model):
_name = 'sh.helpdesk.sla.status'
......@@ -1287,9 +1291,8 @@ class HelpdeskTicket(models.Model):
email_values = {
'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)
self.stage_id = self.company_id.done_stage_id.id
def action_reply(self):
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