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
    • Conocimientos
    • 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

How to send a mail thread when sending messages?

Suscribirse

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

Se marcó esta pregunta
mailmessagesthread
1 Responder
14610 Vistas
Avatar
Flyguy

From a lead in OpenERP I can send a message to the lead. When the lead replies, I can see that reply in the lead. So this mailing back and forth works fine.

But whenever I mail the lead, he only receives the (current) message that I send him. I would like him to receive the entire thread. So instead of just the latest message, I want him to receive the entire history of the conversation.

How can I get this to work?

5
Avatar
Descartar
Avatar
MUHAMMAD Imran
Mejor respuesta

In Odoo, you can use the message_post method to send a message and create a mail thread. Here's an example of how you might use this method to send a message:


# Send a message on a record

record.message_post(

    body='This is the message body',

    subject='This is the subject',

    partner_ids=[partner_id], # list of recipient partner ids

    attachment_ids=[attachment_id], # list of attachment ids

    message_type='comment', # type of message (comment, email, etc.)

    subtype='mail.mt_comment', # subtype of message

    author_id=self.env.user.partner_id.id, # id of the message's author

)


# Send a message on a model

self.env['mail.thread'].message_post(

    body='This is the message body',

    subject='This is the subject',

    partner_ids=[partner_id], # list of recipient partner ids

    attachment_ids=[attachment_id], # list of attachment ids

    message_type='comment', # type of message (comment, email, etc.)

    subtype='mail.mt_comment', # subtype of message

    author_id=self.env.user.partner_id.id, # id of the message's author

)

The message_post method creates a new mail.message record and adds it to the mail thread associated with the record or model. The message will be sent to the specified recipients (partner_ids) and will include any specified attachments (attachment_ids).


You can also use the mail.compose.message model to create and send a message. This allows you to specify additional options, such as the message template and the email addresses of the recipients. Here's an example of how you might use this model to send a message:


compose_form = self.env.ref('mail.email_compose_message_wizard_form')

ctx = {

    'default_model': 'my.model',

    'default_res_id': self.id,

    'default_use_template': bool(template_id),

    'default_template_id': template_id,

    'default_composition_mode': 'comment',

    'mark_so_as_sent': True,

}

return {

    'name': _('Compose Email'),

    'type': 'ir.actions.act_window',

    'view_mode': 'form',

    'res_model': 'mail.compose.message',

    'views': [(compose_form.id, 'form')],

    'view_id': compose_form.id,

    'target': 'new',

    'context': ctx,

}

This will open a wizard that allows the user to compose and send an email message. The message will be added to the mail thread associated with the specified record or model

-1
Avatar
Descartar
¿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
How to post automatically a message on the discussion thread ?
mail thread
Avatar
Avatar
Avatar
2
jul 18
30491
[SOLVED] Extend mail thread view (v10) Resuelto
mail extend thread
Avatar
Avatar
1
nov 17
7246
Fetching e-mail from e-mail account
mail messages fatchmail
Avatar
Avatar
1
jul 15
9865
How do I override the email template used in a child of mail.thread?
mail templates template thread
Avatar
0
ago 22
6636
why the mail and messages inbox suddenly becomes empty ?
mail messages empty inbox
Avatar
0
mar 15
5432
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