Commit 519e2f06 by Arturo Jasso Origel

cambios en diseño de barra de navegación, imagenes cambiar a svg, cambios en diseño frontal

parent 68cd0c7e
......@@ -13,6 +13,7 @@
"base",
"sh_all_in_one_helpdesk",
"vista_backend_theme",
"hide_odoo",
],
"data": [
'data/helpdesk_team.xml',
......@@ -22,6 +23,7 @@
'data/warehouses.xml',
'data/ticket_reason.xml',
'security/ir.model.access.csv',
'views/portal/portal_login.xml',
'views/portal/portal_layout.xml',
'views/portal/portal_my.xml',
'views/portal/portal_tickets_emergency.xml',
......@@ -35,12 +37,10 @@
'views/odoo/helpdesk_warehouse.xml',
'views/odoo/helpdesk_module.xml',
'views/odoo/helpdesk_reason.xml',
'views/odoo/helpdesk_ticket_graph.xml',
'views/odoo/res_users.xml',
],
'assets': {
'web.assets_qweb': [
#'/helpdesk_morsa/static/src/xml/replace_spin.xml',
],
'web.assets_backend': [
'/helpdesk_morsa/static/src/scss/backend.scss'
],
......
......@@ -35,7 +35,16 @@ class HelpdeskTicket(models.Model):
is_support = fields.Boolean('Es soporte',compute='_compute_ticket_type')
is_erp = fields.Boolean('Es ERP',compute='_compute_ticket_type')
is_emergency = fields.Boolean('Es 911',compute='_compute_ticket_type')
user_branch_id = fields.Many2one('warehouse.helpdesk',related="partner_id.user_ids.warehouse_id")
@api.onchange('partner_id')
def get_user_warehouse(self):
if self.partner_id:
user = self.env['res.users'].sudo().search([('partner_id','=',self.partner_id.id)],limit=1)
if user:
self.user_branch_id = user.warehouse_id.id
def _get_color(self):
......@@ -293,6 +302,7 @@ class HelpdeskTicket(models.Model):
if self.env.company.sh_auto_add_customer_as_follower:
res.message_subscribe(partner_ids=res.partner_id.ids)
res.create_initial_history_changes()
res.append_sla_policies()
return res
......@@ -307,6 +317,19 @@ class HelpdeskTicket(models.Model):
def append_sla_policies(self):
sla = self.env['sh.helpdesk.sla'].search([
('sh_team_id','=',self.team_id.id),
('sh_ticket_type_id','=',self.ticket_type.id)
('sh_sla_target_type','=','reaching_stage')
('sh_stage_id','!=',self.stage_id.id)
]).ids
if sla:
self.update({
'sh_sla_policy_ids':[(6,0,sla)]
})
def write(self,vals):
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
.o_background_helpdesk{
background-image: url('/helpdesk_morsa/static/src/img/helpdesk6.jpg') !important;
background-image: url('/helpdesk_morsa/static/src/img/helpdesk6.svg') !important;
background-repeat: no-repeat;
background-size: cover;
......@@ -10,12 +10,31 @@
font-weight: bold !important;
}
.dropdown-item.active,.dropdown-item.active{
background-color: #386aeb;
}
.fa-ticket{
content:url('/helpdesk_morsa/static/src/img/ticket-create.png') !important;
height: 37px;
margin-right: 5px;
}
.bg-light{
box-shadow: 5px 5px 10px rgba(0,0,0,0.3);
}
.navbar-rounded{
border-radius: 30px !important;
background-color: #e4e4e5 !important;
color: #212529;
}
.nav-button{
color:#6C757D !important;
font-size: 14px !important;
}
.card-body-custom{
box-shadow: 10px 10px 20px rgba(0,0,0,0.2);
}
......@@ -25,6 +44,8 @@
}
.o_center_object{
display: flex;
align-items: center;
......@@ -38,6 +59,13 @@
}
#portal_answer_question_1,
#portal_answer_question_2,
#portal_answer_question_3{
margin-left:15px;
margin-right:3px;
}
/* Card Styles */
$deeppurple500: #673ab7;
$grey500: #9e9e9e;
......@@ -137,3 +165,4 @@
......@@ -55,6 +55,9 @@
<xpath expr="//field[@name='sub_category_id']" position="after">
<field name="ticket_reason"/>
</xpath>
<xpath expr="//field[@name='partner_id']" position="after">
<field name="user_branch_id" force_save="1" readonly="1"/>
</xpath>
</field>
</record>
......
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="helpdesk_ticket_graph_tipes" model="ir.ui.view">
<field name="name">helpdesk_ticket.graph.tipes</field>
<field name="model">helpdesk.ticket</field>
<field name="arch" type="xml">
<graph string="Ticket">
<field name="problem_solved_on_time" type="row"/>
<field name="ticket_type" type="measure"/>
</graph>
</field>
</record>
<record id="helpdesk_ticket_graph_act_window" model="ir.actions.act_window">
<field name="name">Tickets</field>
<field name="res_model">helpdesk.ticket</field>
<field name="view_mode">graph</field>
<field name="domain">[('closed_stage_boolean','=',True)]</field>
<field name="view_id" ref="helpdesk_ticket_graph_tipes"/>
</record>
<menuitem name="Resolvidos en tiempo" sequence="2" id="helpdesk_graph" parent="sh_all_in_one_helpdesk.helpdesk_reporting_menu" action="helpdesk_ticket_graph_act_window"/>
</data>
</odoo>
\ No newline at end of file
......@@ -7,8 +7,8 @@
<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_access']" position="after">
<field name="warehouse_id"/>
<field name="warehouse_ids" widget="many2many_tags"/>
<field name="warehouse_id" required="1"/>
<field name="warehouse_ids" widget="many2many_tags" required="1"/>
</xpath>
</field>
</record>
......
......@@ -55,4 +55,105 @@
</xpath>
</template>
<template id="portal_searchbar_2" name="portal_improvee_searchbar" inherit_id="portal.portal_searchbar">
<xpath expr="//nav" position="replace">
<nav t-attf-class="navbar navbar-rounded border navbar-expand-lg navbar-light {{classes if classes else ''}} {{'mt-3 rounded' if breadcrumbs_searchbar else 'border-top-0' }}">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<t t-if="breadcrumbs_searchbar" t-call="portal.portal_breadcrumbs"/>
<span t-else="" class="navbar-brand mb-0 h1 mr-auto" t-esc="title or 'No title'"/>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="sort_by" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Ordenar por:
</a>
<div class="dropdown-menu" aria-labelledby="sort_by">
<t t-foreach="searchbar_sortings" t-as="option">
<a t-att-href="request.httprequest.path + '?' + keep_query('*', sortby=option)"
t-attf-class="dropdown-item#{sortby == option and ' active' or ''}">
<span t-esc="searchbar_sortings[option].get('label')"/>
</a>
</t>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="filter_by" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Filtrar por:
</a>
<div class="dropdown-menu" aria-labelledby="filter_by">
<t t-foreach="searchbar_filters" t-as="option">
<a t-att-href="default_url + '?' + keep_query('*', filterby=option)"
t-attf-class="dropdown-item#{filterby == option and ' active' or ''}">
<span t-esc="searchbar_filters[option].get('label')"/>
</a>
</t>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="group_by" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Agrupar por:
</a>
<div class="dropdown-menu" aria-labelledby="group_by">
<t t-foreach="searchbar_groupby" t-as="option">
<a t-att-href="default_url + '?' + keep_query('*', groupby=option)"
t-attf-class="dropdown-item#{groupby == option and ' active' or ''}">
<span t-esc="searchbar_groupby[option].get('label')"/>
</a>
</t>
</div>
</li>
<li class="nav-item">
<a id="new_request"
class="btn border btn-sm nav-button"
name="new_request"
title="Create Support Request"
aria-label="Create Support Request"
role="button">
<span class="o_center_object">
<i class="fa fa-ticket "/>
Crear Ticket</span>
</a>
</li>
</ul>
<form t-if="searchbar_inputs" class="form-inline o_portal_search_panel ml-lg-4 col-xl-4 col-md-5">
<div class="input-group input-group-sm w-100">
<span class="input-group-append">
<button class="btn btn-primary o_wait_lazy_js" type="submit">
<span class="fa fa-search"/>
</button>
</span>
<input type="text" class="form-control form-control-sm" placeholder="Search" t-att-value='search' name="search"/>
<div class="input-group-prepend">
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown"/>
<div class="dropdown-menu" role="menu">
<t t-foreach='searchbar_inputs' t-as='input'>
<a t-att-href="'#' + input_value['input']"
t-attf-class="dropdown-item#{search_in == input_value['input'] and ' active' or ''}">
<span t-out="input_value['label']"/>
</a>
</t>
</div>
</div>
</div>
</form>
</div>
</nav>
</xpath>
</template>
<!-- -->
</odoo>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="hide_db_manager" name="hide_db_manager" inherit_id="hide_odoo.login_page_layout">
<xpath expr="//div[@class='text-center small mt-4 pt-3 login--footer']" position="replace">
</xpath>
</template>
</data>
</odoo>
\ No newline at end of file
......@@ -18,7 +18,7 @@
<t t-set="count" t-value="support_count" />
<t t-set="desc" t-value="description_support"/>
<t t-set="avatar" t-value="avatar_support"/>
<t t-set="background" t-value="'/helpdesk_morsa/static/src/img/support.jpg'"/>
<t t-set="background" t-value="'/helpdesk_morsa/static/src/img/support_back.svg'"/>
</t>
<t t-call="portal.portal_docs_entry">
......@@ -27,7 +27,7 @@
<t t-set="count" t-value="erp_count" />
<t t-set="desc" t-value="description_erp"/>
<t t-set="avatar" t-value="avatar_erp"/>
<t t-set="background" t-value="'/helpdesk_morsa/static/src/img/erp.jpg'"/>
<t t-set="background" t-value="'/helpdesk_morsa/static/src/img/erp_back.svg'"/>
</t>
<t t-call="portal.portal_docs_entry">
<t t-set="title">TI 911</t>
......@@ -35,7 +35,7 @@
<t t-set="count" t-value="ti_count" />
<t t-set="desc" t-value="description_ti"/>
<t t-set="avatar" t-value="avatar_emergency"/>
<t t-set="background" t-value="'/helpdesk_morsa/static/src/img/emergency.png'"/>
<t t-set="background" t-value="'/helpdesk_morsa/static/src/img/emergency_back.svg'"/>
</t>
</xpath>
</template>
......
......@@ -3,17 +3,16 @@
<template id="portal_my_support" name="Mis Tickets">
<t t-call="portal.portal_layout">
<t t-set="breadcrumbs_searchbar" t-value="True" />
<t t-call="portal.portal_searchbar">
<t t-set="title">Soporte Técnico</t>
<div class="form-inline ml-lg-4">
<a id="new_request" class="btn btn-secondary btn-sm" style="color:#FFFFFF" name="new_request" title="Create Support Request" aria-label="Create Support Request" role="button"><i class="fa fa-plus" />Crear Ticket</a>
</div>
<input type="hidden" name="mdl_shw" id="mdl_shw" t-att-value="created"/>
</t>
<input type="hidden" name="mdl_shw" id="mdl_shw" t-att-value="created"/>
<div id="createticketModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
......
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