Commit 1804d8fb by Arturo Jasso Origel

cambios en la estructura de carpetas y modelos

parent 38d3fb9c
......@@ -11,21 +11,21 @@
"version":"15.0.34",
"depends": [
"base",
"portal_design_helpdesk",
"sh_all_in_one_helpdesk",
"vista_backend_theme",
"hide_odoo",
],
"data": [
'security/ir.model.access.csv',
'data/helpdesk_team.xml',
'data/helpdesk_stage.xml',
'data/sla_policies.xml',
'data/modules.xml',
'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_my_ti.xml',
'views/portal/portal_tickets_emergency.xml',
'views/portal/portal_tickets_erp.xml',
'views/portal/portal_tickets_support.xml',
......
from . import portal
from . import portal_soporte
from . import portal_erp
from . import portal_emergency
from . import main
\ No newline at end of file
......@@ -27,7 +27,7 @@ class HelpdeskTicket(models.Model):
('soporte','Soporte'),('mejora','Mejora')
],string="Tipo de asistencia")
ticket_reason = fields.Many2one('ticket.reason','Motivo de Ticket',
default=lambda self: self.env.ref('helpdesk_morsa.reason_anything').id
#default=lambda self: self.env.ref('helpdesk_morsa.reason_anything').id
)
problem_solved_on_time = fields.Boolean('¿Solucionamos complementame tu problema?')
good_service_actitude = fields.Boolean('¿Ha sido buena nuestra actitud de Servicio?')
......
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.svg') !important;
background-repeat: no-repeat;
background-size: cover;
}
.small{
font-size: 12px !important;
font-weight: bold !important;
}
.dropdown-item.active,.dropdown-item.active{
background-color: #386aeb;
}
.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;
margin-bottom: 16px;
}
.nav-button{
border-radius: 30px !important;
padding: 0.5rem 1rem;
}
.nav-mr{
margin-right:10px
}
.card-body-custom{
box-shadow: 10px 10px 20px rgba(0,0,0,0.2);
}
.table-responsive{
box-shadow: 5px 5px 10px rgba(0,0,0,0.3);
}
.o_center_object{
display: flex;
align-items: center;
justify-content: center;
}
.o_center_object_right{
display: flex;
align-items: center;
justify-content: flex-end;
}
#portal_answer_question_1,
#portal_answer_question_2,
#portal_answer_question_3{
margin-left:15px;
margin-right:3px;
}
/* Card Styles */
$deeppurple500: #673ab7;
$grey500: #9e9e9e;
.card {
background-color: #ffffff;
text-align: left;
border-radius: 4px;
overflow: hidden;
&__header {
}
&__body {
padding: 16px 0;
}
&__primary-title {
padding: 8px 16px;
h1, h2, h3, h4, h5, h6 { margin: 0; }
}
&__supporting-text {
padding: 8px 16px;
}
&__actions {
padding: 8px;
}
}
/* Material & utility classes */
.bg {
&--deep-purple { color: #ffffff; background-color: $deeppurple500; }
}
.text {
&-normal { font-weight: normal; }
&-bold { font-weight: bold; }
&-secondary { color: $grey500; }
&-small { font-size: 14px; }
&-medium { font-size: 16px; }
&-large { font-size: 24px; }
}
.item {
display: inline-block;
margin-top: 8px;
max-height: 72px;
vertical-align: middle;
&--two-lines {
}
}
.image {
margin: 0;
padding: 0;
overflow: hidden;
&--avatar {
display: inline-block;
margin-right: 16px;
width: 56px;
height: 56px;
border-radius: 50%;
vertical-align: middle;
}
img {
display: inline-block;
width: 100%;
height: auto;
vertical-align: middle;
border: none;
}
}
.btn {
&--icon {
transition: color 0.3s;
&:hover {
color: $grey500;
}
}
}
.depth {
&--two {
box-shadow: 0 3px 12px rgba(0,0,0,0.23), 0 3px 12px rgba(0,0,0,0.16);
}
}
}
\ No newline at end of file
......@@ -32,13 +32,7 @@
<input type="radio" name="smiley" value="4" class="neutral radio_smile" />
<input type="radio" name="smiley" value="3" class="sad radio_smile" />
<input type="radio" name="smiley" value="2" class="very-sad radio_smile" />
<!--<div class="form-group" style="color:white;">
<label for="response">¿Te respondieron antes de los 10 minutos?</label>
<input type="radio" name="attended" id="response" value="Si">Si</input>
<input type="radio" name="attended" id="response" value="No">No</input>
</div>-->
<div class="form-group">
<input type="hidden" name="ticket_id" id="ticket_id" t-att-value="ticket" style="display: none;" />
<label style="color:white;" for="comment">Comentario</label>
......@@ -67,10 +61,6 @@
</xpath>
</template>
<template id="remove_po_db" name="Remove Power and DB manager" inherit_id="vista_backend_theme.code_custom_login">
<xpath expr="//div[@class='text-center small mt-4 pt-3 border-top']" position="replace">
<div></div>
</xpath>
</template>
</odoo>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="portal_edit" name="portal_home_helpdesk" inherit_id="portal.portal_my_home">
<xpath expr="//h3" position="replace">
<h3>Mesa de Ayuda</h3>
</xpath>
<xpath expr="//div[@class='o_portal_docs list-group']" position="attributes">
<attribute name="class">o_portal_docs row</attribute>
</xpath>
</template>
<template id="portal_my_home_ticket" name="Portal My Home : ticket entries" inherit_id="sh_all_in_one_helpdesk.portal_my_home_ticket" priority="30">
<xpath expr="//t[@t-call='portal.portal_docs_entry']" position="replace">
<t t-call="portal.portal_docs_entry">
<t t-set="title">Soporte Técnico</t>
<t t-set="url" t-value="'/my/soporte'" />
<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_back.svg'"/>
</t>
<t t-call="portal.portal_docs_entry">
<t t-set="title">Asistencia ERP / Odoo</t>
<t t-set="url" t-value="'/my/erp'" />
<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_back.svg'"/>
</t>
<template id="portal_my_home_IT" name="Portal My Home : IT" inherit_id="portal.portal_my_home" priority="100">
<xpath expr="//div[hasclass('o_portal_docs')]" position="inside">
<t t-call="portal.portal_docs_entry">
<t t-set="title">TI 911</t>
<t t-set="url" t-value="'/my/911'" />
<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_back.svg'"/>
<t t-set="title">Tecnologías de la información</t>
<t t-set="url" t-value="'/my/ti'" />
<t t-set="background" t-value="'/helpdesk_morsa/static/src/img/ti.svg'"/>
</t>
</xpath>
</template>
<template id="remove_invoices" name="remove invoices" inherit_id="account.portal_my_home_invoice">
<xpath expr="//t[@t-call='portal.portal_docs_entry']" position="replace"></xpath>
</template>
<template id="remove_sale_orders" name="remove sale orders" inherit_id="sale.portal_my_home_sale">
<xpath expr="//t[@t-call='portal.portal_docs_entry']" position="replace"></xpath>
<xpath expr="//t[@t-call='portal.portal_docs_entry']" position="replace"></xpath>
</template>
<template id="remove_purchase_orders" name="remove purchase orders" inherit_id="purchase.portal_my_home_purchase">
<xpath expr="//t[@t-call='portal.portal_docs_entry']" position="replace"></xpath>
<xpath expr="//t[@t-call='portal.portal_docs_entry']" position="replace"></xpath>
</template>
<template id="remove_proyects" name="remove proyects" inherit_id="project.portal_my_home">
<xpath expr="//t[@t-call='portal.portal_docs_entry'][4]" position="replace"></xpath>
<xpath expr="//t[@t-call='portal.portal_docs_entry'][4]" position="replace"></xpath>
</template>
<template id="remove_timesheet" name="remove timesheet" inherit_id="hr_timesheet.portal_my_home_timesheet">
<xpath expr="//t[@t-call='portal.portal_docs_entry'][4]" position="replace"></xpath>
</template>
<template id="portal_my_home_menu_ticket" name="Portal layout : ticket menu entries" inherit_id="portal.portal_breadcrumbs" priority="60">
<xpath expr="//ol[hasclass('o_portal_submenu')]" position="inside">
......
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="portal_my_ti" name="Tecnologias de la información">
<t t-call="portal.portal_layout">
<t t-set="my_details" t-value="True"/>
<div class="o_portal_my_home">
<div class="oe_structure" id="oe_structure_portal_my_ti_1"/>
<h3>Mesa de Ayuda</h3>
<div class="o_portal_docs row">
<t t-call="portal.portal_docs_entry">
<t t-set="title">Soporte Técnico</t>
<t t-set="url" t-value="'/my/soporte'" />
<t t-set="count" t-value="support_count" />
<t t-set="desc" t-value="'Obtenga Ayuda de TI'"/>
<t t-set="avatar" t-value="'/helpdesk_morsa/static/src/img/support.svg'"/>
<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 / Odoo</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="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 t-call="portal.portal_docs_entry">
<t t-set="title">TI 911</t>
<t t-set="url" t-value="'/my/911'" />
<t t-set="count" t-value="ti_count" />
<t t-set="desc" t-value="'Emergerncias'"/>
<t t-set="avatar" t-value="'/helpdesk_morsa/static/src/img/emergency.svg'"/>
<t t-set="background" t-value="'/helpdesk_morsa/static/src/img/emergency_back.svg'"/>
</t>
</div>
</div>
<div class="oe_structure" id="oe_structure_portal_my_ti_2"/>
</t>
</template>
</odoo>
\ No newline at end of file
......@@ -15,14 +15,14 @@ _logger = logging.getLogger(__name__)
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)
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)
else:
return request.redirect('/web/login?error=access')
else:
return request.redirect('/web/login?error=access')
else:
return super(HomeInherit, self).web_login(redirect=redirect, **kw)
return super(HomeInherit, self).web_login(redirect=redirect, **kw)
def auth_user_rpc(self,username,password):
uid = 0
......
# -*- coding: utf-8 -*-
{
"name":"Portal Diseño",
"author":"Arturo Jasso",
"website":"",
"support":"arturo.jasso@morsa.com.mx",
"category":"",
"license":"OPL-1",
"summary":"Actualización de la vista portal, cambio de diseño",
"description":"""Actualización para requerimientos de morsa """,
"version":"15.0.34",
"depends": [
"base",
"portal",
"account",
"sale",
"purchase",
"project",
"vista_backend_theme",
"sh_all_in_one_helpdesk",
"hide_odoo",
],
"data": [
'views/portal_login.xml',
'views/portal_layout.xml',
'views/portal_backend_thanks.xml',
],
'assets': {
'web.assets_frontend': [
'/portal_design_helpdesk/static/src/scss/portal.scss',
],
},
"application":False,
"auto_install":False,
"installable":True,
'images': [],
}
.o_background_helpdesk{
background-image: url('/portal_design_helpdesk/static/src/img/helpdesk6.svg') !important;
background-repeat: no-repeat;
background-size: cover;
}
.small{
font-size: 12px !important;
font-weight: bold !important;
}
.dropdown-item.active,.dropdown-item.active{
background-color: #386aeb;
}
.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;
margin-bottom: 16px;
}
.nav-button{
border-radius: 30px !important;
padding: 0.5rem 1rem;
}
.nav-mr{
margin-right:10px
}
.card-body-custom{
box-shadow: 10px 10px 20px rgba(0,0,0,0.2);
}
.table-responsive{
box-shadow: 5px 5px 10px rgba(0,0,0,0.3);
}
.o_center_object{
display: flex;
align-items: center;
justify-content: center;
}
.o_center_object_right{
display: flex;
align-items: center;
justify-content: flex-end;
}
/* Card Styles */
$deeppurple500: #673ab7;
$grey500: #9e9e9e;
.card {
background-color: #ffffff;
text-align: left;
border-radius: 4px;
overflow: hidden;
&__header {
}
&__body {
padding: 16px 0;
}
&__primary-title {
padding: 8px 16px;
h1, h2, h3, h4, h5, h6 { margin: 0; }
}
&__supporting-text {
padding: 8px 16px;
}
&__actions {
padding: 8px;
}
}
/* Material & utility classes */
.bg {
&--deep-purple { color: #ffffff; background-color: $deeppurple500; }
}
.text {
&-normal { font-weight: normal; }
&-bold { font-weight: bold; }
&-secondary { color: $grey500; }
&-small { font-size: 14px; }
&-medium { font-size: 16px; }
&-large { font-size: 24px; }
}
.item {
display: inline-block;
margin-top: 8px;
max-height: 72px;
vertical-align: middle;
&--two-lines {
}
}
.image {
margin: 0;
padding: 0;
overflow: hidden;
&--avatar {
display: inline-block;
margin-right: 16px;
width: 56px;
height: 56px;
border-radius: 50%;
vertical-align: middle;
}
img {
display: inline-block;
width: 100%;
height: auto;
vertical-align: middle;
border: none;
}
}
.btn {
&--icon {
transition: color 0.3s;
&:hover {
color: $grey500;
}
}
}
.depth {
&--two {
box-shadow: 0 3px 12px rgba(0,0,0,0.23), 0 3px 12px rgba(0,0,0,0.16);
}
}
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="remove_po_db" name="Remove Power and DB manager" inherit_id="vista_backend_theme.code_custom_login">
<xpath expr="//div[@class='text-center small mt-4 pt-3 border-top']" position="replace">
<div></div>
</xpath>
</template>
</odoo>
\ No newline at end of file
......@@ -2,12 +2,9 @@
<odoo>
<template id="portal_layout_inherit" name="portal inherit" inherit_id="portal.portal_layout">
<xpath expr="//div[@id='o_my_sidebar']" position="replace">
</xpath>
<xpath expr="//div[@t-attf-class='col-12 col-md col-lg-6']" position="attributes">
<attribute name="t-attf-class">col-12 col-md-12 col-lg-12 col-xl-12 col-sm-12</attribute>-->
<attribute name="t-attf-class">col-12 col-md-12 col-lg-12 col-xl-12 col-sm-12</attribute>
</xpath>
</template>
......@@ -19,33 +16,81 @@
</template>
<template id="portal_edit" name="portal_home_helpdesk" inherit_id="portal.portal_my_home">
<xpath expr="//h3" position="replace">
<h2>BIENVENIDO</h2>
</xpath>
<xpath expr="//div[@class='o_portal_docs list-group']" position="attributes">
<attribute name="class">o_portal_docs row</attribute>
</xpath>
</template>
<template id="remove_invoices" name="remove invoices" inherit_id="account.portal_my_home_invoice">
<xpath expr="//t[@t-call='portal.portal_docs_entry']" position="replace">
<div></div>
</xpath>
</template>
<template id="remove_sale_orders" name="remove sale orders" inherit_id="sale.portal_my_home_sale">
<xpath expr="//t[@t-call='portal.portal_docs_entry']" position="replace">
<div></div>
</xpath>
<xpath expr="//t[@t-call='portal.portal_docs_entry']" position="replace">
<div></div>
</xpath>
</template>
<template id="remove_purchase_orders" name="remove purchase orders" inherit_id="purchase.portal_my_home_purchase">
<xpath expr="//t[@t-call='portal.portal_docs_entry']" position="replace">
<div></div>
</xpath>
<xpath expr="//t[@t-call='portal.portal_docs_entry']" position="replace">
<div></div>
</xpath>
</template>
<template id="remove_proyects" name="remove proyects" inherit_id="project.portal_my_home">
<xpath expr="//t[@t-call='portal.portal_docs_entry']" position="replace"><div></div></xpath>
<xpath expr="//t[@t-call='portal.portal_docs_entry']" position="replace"><div></div></xpath>
</template>
<template id="template_id" name="template_name" inherit_id="sh_all_in_one_helpdesk.portal_my_home_ticket">
<xpath expr="//t[@t-call='portal.portal_docs_entry']" position="replace"><div></div></xpath>
</template>
<template id="remove_timesheet" name="remove timesheet" inherit_id="hr_timesheet.portal_my_home_timesheet">
<xpath expr="//t[@t-call='portal.portal_docs_entry']" position="replace"><div></div></xpath>
</template>
<template id="change_portal_layout" name="portal update docs" inherit_id="portal.portal_docs_entry">
<xpath expr="//a" position="replace">
<div class="col-sm-12 col-md-6 col-lg-4 mb-5">
<div class="card-body card-body-custom" style="background-color:white !important;">
<header class="card__primary-title">
<t t-if="avatar">
<figure class="image image--avatar">
<t t-if="avatar">
<img t-att-src="avatar"/>
</t>
<t t-else="">
<img src="/helpdesk_morsa/static/src/img/13794815201667484387.svg"/>
</t>
<img t-att-src="avatar"/>
</figure>
<div class="item item--two-lines">
<h5 t-att-title="title"><t t-esc="title"/></h5>
</div>
</t>
<div class="item item--two-lines">
<h5 t-att-title="title"><t t-esc="title"/></h5>
</div>
</header>
<figure class="image">
<t t-if="background">
<t t-if="background">
<figure class="image">
<img t-att-src="background"/>
</t>
<t t-else="">
<img src="/helpdesk_morsa/static/src/img/13794815201667484387.svg"/>
</t>
</figure>
<span class="card__supporting-text"><t t-esc="desc"/></span>
</figure>
</t>
<t t-if="desc">
<span class="card__supporting-text"><t t-esc="desc"/></span>
</t>
<footer class="card__actions">
<a class="btn btn-primary" t-att-href="url">Ver mis tickets</a>
</footer>
......@@ -59,8 +104,6 @@
<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>
......@@ -153,6 +196,5 @@
</nav>
</xpath>
</template>
<!-- -->
</odoo>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment