Hi All,
I am using Odoo15, in which I have a requirement to change the email subject of a custom template based on a condition. The template is designed in code the itself.
My email subject is as follows: This is a test mail for {{ object.my_field_name }}
For condition check,
if condition_satisfies: subject = "Condition Satisfied - " + subject
else: subject = subject.
In case of condition satisfied, while I am triggering the mail, the subject is coming as
Condition Satisfied - This is a test mail for {{ object.my_field_name }}
instead of actual value of my_field_name.
Do anyone have a solution to resolve this?