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 Email Notifications

Suscribirse

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

Se marcó esta pregunta
emailnotificationsv18CommunityEditionEmailNotification
1 Responder
2441 Vistas
Avatar
Shreya Doodipala

Where is the code for sending the following email notification from Odoo CRM located? I want to make changes to its content.

Odoo v18 Community Edition

0
Avatar
Descartar
Avatar
DataInteger Consultancy Services LLP
Mejor respuesta
Root of the Notification
  • This kind of notification does not use a QWeb or standard email template .
  • It is a system-generated notification based on a mail.activity being assigned.
  • Specifically, when an activity is scheduled/assigned (like lead assignment), Odoo internally uses mail.activity logic , and the notification is rendered in Python code .

Where to Find the Code
  1. Python Source File:
    File:
    odoo/addons/mail/models/mail_activity.py
    
  2. Relevant Method:
    def _notify_get_message_body(self, ...):
    
    This method dynamically generates the email/message content for the activity.
  3. Trigger Mechanism:
    When a new lead is created and assigned to a salesperson, the system triggers a mail.activity for that user with activity_type_id .

Why You Can't Find activity_data_lead_assigned
  • That ID ( activity_data_lead_assigned ) does not exist in standard records.
  • Lead assignment messages are not controlled via templated XML or records , but via backend logic (as above).
How to Customize the Notification (Options)
Option 1: Override the method

Create a custom module and override _notify_get_message_body in mail.activity .

Example:

from odoo.addons.mail.models.mail_activity import MailActivity

class CustomMailActivity(MailActivity):
    def _notify_get_message_body(self, **kwargs):
        body = super()._notify_get_message_body(**kwargs)
        # Add your custom message or modify the content
        if self.res_model == 'crm.lead':
            body = "<p>You have a new lead assigned: %s</p>" % (self.res_id)
        return body
Option 2: Use Server Actions or Automated Actions
  • Trigger on lead assignment or activity creation.
  • Send custom email using your own Email Template .
  • Go to: Settings > Technical > Automation > Automated Actions .

Suggested Path for Lead Assignment Notification Customization
  1. Create a custom email template .
  2. Use an Automated Action :
    • Model: CRM Lead
    • Trigger: On Update
    • Condition: user_id is changed.
    • Action: Send Email , using your custom template.

Final Notes
  • The mail.notification object simply transmits the message (email or chatter), but does not generate the text. That comes from mail.activity .
  • You won't find this message under “Email Templates,” because Odoo generates it dynamically.


Thanks & Regards,

Email: contact@datainteger.com

-1
Avatar
Descartar
Shreya Doodipala
Autor

1. There is no record with id activity_data_lead_assigned
2. This seems to be related to mail.notification, not mail.activity
3. This template is not present in Email Templates.

¿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
Unable to send email notifications through write
notifications v18 CommunityEdition
Avatar
Avatar
1
jun 25
1782
Unable to send emails
email mailtemplate v18 CommunityEdition
Avatar
Avatar
Avatar
2
jun 25
1346
Automatic notification upon creation of Quotation v18 Resuelto
notifications v18
Avatar
Avatar
2
oct 25
1820
odoo message notifications: wrong urls, change FROM and REPLY-TO
email notifications
Avatar
Avatar
2
sept 20
5782
After task created no email notification
email notifications
Avatar
2
mar 15
7978
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