Ir al contenido
Menú
Se marcó esta pregunta

When a message is sent by chatter within an opportunity to the followers of that case, when they receive the email they receive only the written message but nowhere appears the customer to whom you want to sell, forcing the person who received the message from chatter to enter the opportunity in Odoo.


I already created an email template that automatically places the name of the customer, but it is very time consuming to enlarge the message window and then select the template, so I am looking for an alternative that automatically places the name of the customer ("Cliente Modelo C.A" in this example) in the message or in the subject of the email so that the user who writes in the chat of the opportunity does not have to manually type the name of the customer who is generating the opportunity and that the followers know which customer is talking about just by seeing his email.


I tried to modify the 'body' field of 'mail_message' and it didn't work, I attach the code I used in my personal module:


class ChatterCRM(models.Model):
    _inherit = 'mail.message'

    body = fields.Html('Contents', default=lambda self: self._default_messages(), sanitize_style=True)
   
      def _default_messages(self):
        default_body = f "Customer {self.partner_id.name},"
Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
nov 24
4079
0
sept 23
1706
CRM model Resuelto
2
oct 22
2952
0
ene 24
1143
0
sept 23
1591