Why aren't %if %endif statements working in Odoo V8?
When you create a new e-mail template (under 'Marketing' > 'Mail templates' and when you then click on 'Edit template' you could add %if %endif statements.
For example:
Dear ${(object.name or 'Sir / Madam')|safe} Thank you for registering.. We have these details: % if object.street: ${(object.street or '-') | safe} % endif
However, when you save this template and preview it you'll see it is not working. If I send the e-mail to the person it will be empty like this:
The content isn't printed and it seems that %if %endif ruins the whole e-mail.
Could anybody explain me why this is not working and what I'm doing wrong?