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
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
odoo/addons/mail/models/mail_activity.py
def _notify_get_message_body(self, ...):This method dynamically generates the email/message content for the activity.
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
Thanks & Regards,
Email: contact@datainteger.com
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.
Creează-ți un cont astăzi pentru a beneficia de funcții exclusive și a interacționa cu minunata noastră comunitate!
Înscrie-te| Postări similare | Răspunsuri | Vizualizări | Activitate | |
|---|---|---|---|---|
|
1
iun. 25
|
3376 | |||
|
2
iun. 25
|
2426 | |||
|
1
ian. 26
|
1554 | |||
|
2
oct. 25
|
2972 | |||
|
2
sept. 20
|
7321 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.