Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
745 Prikazi

The dynamic values are not being replaced by actual values, When I receive emails. Please Help.

Dear {{ object.partner_id.display_name }},


Your subscription {{ object.name }} has been marked for renewal.

Please review your subscription details. 


Thank you!

Request was: We would like to create a notification that is emailed when a subscription has the tag “renew” - a tag Odoo automatically applies to the sub .

What I did: I created an automated action. 
Model: Subcription
Trigger: On update
Before Update Domain: Tags> Analytic Tag = "renew"
Action To do: Send Email

That is my configuration

Avatar
Opusti
Best Answer

Hi,

The issue is that the dynamic values like {{ object.partner_id.display_name }} are written in Jinja syntax, which isn’t supported in Odoo's body_html email template field.


To fix this, use the QWeb-compatible t-out syntax instead. Here's how your email body should look:



<p>Dear <t t-out="object.partner_id.display_name" />,</p>


<p>Your subscription <t t-out="object.name" /> has been marked for renewal.</p>


<p>Please review your subscription details.</p>


<p>Thank you!</p>


This will ensure the actual values are rendered properly when the email is sent. Make sure your template is set to use QWeb and linked correctly in your automated action.

Hope it helps

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
0
sep. 23
1207
0
nov. 24
729
0
jun. 24
1246
2
nov. 24
1540
0
dec. 23
1007