Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
890 Vizualizări

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

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
0
sept. 23
1344
0
nov. 24
859
0
iun. 24
1364
2
nov. 24
1760
0
dec. 23
1162