Ir al contenido
Odoo Menú
  • Iniciar sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • PdV para tiendas
    • PdV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en vivo
    • eLearning
    Cadena de suministro
    • Inventario
    • Manufactura
    • PLM
    • Compras
    • Mantenimiento
    • Calidad
    Recursos humanos
    • Empleados
    • Reclutamiento
    • Vacaciones
    • Evaluaciones
    • Referencias
    • Flotilla
    Marketing
    • Redes sociales
    • Marketing por correo
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyectos
    • Registro de horas
    • Servicio externo
    • Soporte al cliente
    • Planeación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Artículos
    • WhatsApp
    Aplicaciones externas Studio de Odoo Plataforma de Odoo en la nube
  • Industrias
    Venta minorista
    • Librería
    • Tienda de ropa
    • Mueblería
    • Tienda de abarrotes
    • Ferretería
    • Juguetería
    Alimentos y hospitalidad
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidora de bebidas
    • Hotel
    Bienes inmuebles
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión de bienes inmuebles
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Firma contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Manufactura
    • Textil
    • Metal
    • Muebles
    • Comida
    • Cervecería
    • Regalos corporativos
    Salud y ejercicio
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Trades
    • Personal de mantenimiento
    • Hardware y soporte de TI
    • Sistemas de energía solar
    • Zapateros y fabricantes de calzado
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin fines de lucro
    • Agencia para la protección del medio ambiente
    • Alquiler de anuncios publicitarios
    • Fotografía
    • Alquiler de bicicletas
    • Distribuidor de software
    Descubre todas las industrias
  • Odoo Community
    Aprende
    • Tutoriales
    • Documentación
    • Certificaciones
    • Capacitación
    • Blog
    • Podcast
    Fortalece la educación
    • Programa educativo
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtén el software
    • Descargar
    • Compara ediciones
    • Versiones
    Colabora
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Conviértete en partner
    • Servicios para partners
    • Registra tu firma contable
    Obtén servicios
    • Encuentra un partner
    • Encuentra un contador
    • Contacta a un consultor
    • Servicios de implementación
    • Referencias de clientes
    • Soporte
    • Actualizaciones
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicita una demostración
  • Precios
  • Ayuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyectos
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

Modify the function retrieve_dashboard in helpdesk.py

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
domainhelpdeskodoo
1 Responder
3551 Vistas
Avatar
Mohamad Ali Chamas

I am trying to super the function "retrieve_dashboard" found in the python file "helpdesk.py". This is to change the view from my tickets to all tickets inside the helpdesk overview. So, I modified the domain inside the function from the main code and it worked and now I want to super the function so that I can use it in my code. This is what I did: 


from odoo import api,fields,models,_
from odoo.osv import expression
class HelpDeskTeamInh(models.Model):
_inherit = 'helpdesk.team'
@api.model
def retrieve_dashboard(self):
domain = [('user_id', '!=', self.env.uid)]
res=super(HelpDeskTeamInh, self).retrieve_dashboard()
group_fields = ['priority', 'create_date', 'stage_id', 'close_hours']
list_fields = ['priority', 'create_date', 'stage_id', 'close_hours']
# TODO: remove SLA calculations if user_uses_sla is false.
user_uses_sla = self.user_has_groups('helpdesk.group_use_sla') and \
bool(self.env['helpdesk.team'].search(
[('use_sla', '=', True), '|', ('member_ids', 'in', self._uid), ('member_ids', '=', False)]))
if user_uses_sla:
group_fields.insert(1, 'sla_deadline:year')
group_fields.insert(2, 'sla_deadline:hour')
group_fields.insert(3, 'sla_reached_late')
list_fields.insert(1, 'sla_deadline')
list_fields.insert(2, 'sla_reached_late')
HelpdeskTicket = self.env['helpdesk.ticket']
tickets = HelpdeskTicket.search_read(expression.AND([domain, [('stage_id.is_close', '=', False)]]),
['sla_deadline', 'open_hours', 'sla_reached_late', 'priority'])
result = {
'helpdesk_target_closed': self.env.user.helpdesk_target_closed,
'helpdesk_target_rating': self.env.user.helpdesk_target_rating,
'helpdesk_target_success': self.env.user.helpdesk_target_success,
'today': {'count': 0, 'rating': 0, 'success': 0},
'7days': {'count': 0, 'rating': 0, 'success': 0},
'my_all': {'count': 0, 'hours': 0, 'failed': 0},
'my_high': {'count': 0, 'hours': 0, 'failed': 0},
'my_urgent': {'count': 0, 'hours': 0, 'failed': 0},
'show_demo': not bool(HelpdeskTicket.search([], limit=1)),
'rating_enable': False,
'success_rate_enable': user_uses_sla
}
return res

Any Help Please?

0
Avatar
Descartar
Avatar
Muhammad Bilal
Mejor respuesta

res=super(HelpDeskTeamInh, self).retrieve_dashboard() first add this after this domain = [('user_id', '!=', self.env.uid)] at the end return res make sure all you do is in between them

0
Avatar
Descartar
Mohamad Ali Chamas
Autor

Yes, but this is done in the piece of code I provided above and no changes were applied.

¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Registrarse
Publicaciones relacionadas Respuestas Vistas Actividad
How to add a domain to my website on Odoo 18 Community Edition
domain odoo
Avatar
Avatar
1
nov 24
3525
connect helpdesk module with website Resuelto
helpdesk odoo
Avatar
Avatar
Avatar
Avatar
3
abr 25
5396
Explaination on how Odoo's domain model work
domain odoo
Avatar
0
jun 21
3266
how to move of apps icon in odoo?
helpdesk odoo
Avatar
Avatar
1
sept 20
7633
How to use domain to filter user based on department? Resuelto
domain odoo
Avatar
Avatar
1
oct 15
7901
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento en Odoo.sh
  • Soporte
  • Actualizaciones del software
  • Desarrollos personalizados
  • Educación
  • Encuentra un contador
  • Encuentra un partner
  • Conviértete en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contáctanos
  • Empleos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidad
  • Seguridad
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y estar totalmente integrado.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now