Ir al contenido
Odoo Menú
  • Identificarse
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • TPV para tiendas
    • TPV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en directo
    • eLearning
    Cadena de suministro
    • Inventario
    • Fabricación
    • PLM
    • Compra
    • Mantenimiento
    • Calidad
    Recursos Humanos
    • Empleados
    • Reclutamiento
    • Ausencias
    • Evaluación
    • Referencias
    • Flota
    Marketing
    • Marketing social
    • Marketing por correo electrónico
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyecto
    • Partes de horas
    • Servicio de campo
    • Servicio de asistencia
    • Planificación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Información
    • WhatsApp
    Aplicaciones de terceros Studio de Odoo Plataforma de Odoo Cloud
  • Industrias
    Comercio al por menor
    • Librería
    • Tienda de ropa
    • Tienda de muebles
    • Tienda de ultramarinos
    • Ferretería
    • Juguetería
    Alimentación y hostelería
    • Bar y taberna
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidor de bebidas
    • Hotel
    Inmueble
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión inmobiliaria
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Empresa contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Fabricación
    • Textil
    • Metal
    • Muebles
    • Alimentos
    • Brewery
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Oficios
    • Handyman
    • Hardware y asistencia informática
    • Sistemas de energía solar
    • Zapatero
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin ánimo de lucro
    • Agencia de protección del medio ambiente
    • Alquiler de paneles publicitarios
    • Estudio fotográfico
    • Alquiler de bicicletas
    • Distribuidor de software
    Browse all Industries
  • Comunidad
    Aprender
    • Tutoriales
    • Documentación
    • Certificaciones
    • Formación
    • Blog
    • Podcast
    Potenciar la educación
    • Programa de formación
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtener el software
    • Descargar
    • Comparar ediciones
    • Versiones
    Colaborar
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Convertirse en partner
    • Services for Partners
    • Registrar tu empresa contable
    Obtener servicios
    • Encontrar un partner
    • Encontrar un asesor fiscal
    • Contacta con un experto
    • Servicios de implementación
    • Referencias de clientes
    • Ayuda
    • Actualizaciones
    GitHub YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicitar 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
  • Proyecto
  • 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
2484 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.

Inscribirse
Publicaciones relacionadas Respuestas Vistas Actividad
Unable to send email notifications through write
notifications v18 CommunityEdition
Avatar
Avatar
1
jun 25
1818
Unable to send emails
email mailtemplate v18 CommunityEdition
Avatar
Avatar
Avatar
2
jun 25
1355
Automatic notification upon creation of Quotation v18 Resuelto
notifications v18
Avatar
Avatar
2
oct 25
1849
odoo message notifications: wrong urls, change FROM and REPLY-TO
email notifications
Avatar
Avatar
2
sept 20
5806
After task created no email notification
email notifications
Avatar
2
mar 15
7993
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento Odoo.sh
  • Ayuda
  • Actualizar
  • Desarrollos personalizados
  • Educación
  • Encontrar un asesor fiscal
  • Encontrar un partner
  • Convertirse en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contacta con nosotros
  • Puestos de trabajo
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Información 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 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