Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie

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},"
Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
lis 24
4207
0
wrz 23
1808
CRM model Rozwiązane
2
paź 22
3048
0
sty 24
1241
0
wrz 23
1651