Skip to Content
Menu
This question has been flagged
2 Replies
4935 Views

How Can I make here an if statement:

Sehr  geehrter ${object.partner_id.title.name} ${object.partner_id.name},

So that when the partner_id.title is == Herr it should take this:

Sehr geehrter Herr

and when it's euqla Frau, this:

Sehr geehrte Frau


Is this possible???

Avatar
Discard
Best Answer

As email template doesn't allow if else it's only allow if 

Try this code 

<span>Sehr  geehrter ${object.partner_id.title.name}</<span>
% if object.partner_id.name=='Herr':
<span>Herr</span>
% endif
% if object.partner_id.name=='euqla Frau':
<span>Frau</span>
% endif

Avatar
Discard
Author

This is not working my friend. :(

Author Best Answer

when I give the email template this:


% if object.partner_id.name=='Herr':
Herr
% endif
% if object.partner_id.name=='Frau':
Frau

% endif
it's not working
Avatar
Discard
Related Posts Replies Views Activity
8
May 23
34407
1
Feb 24
924
1
Jul 23
1650
3
Dec 23
17571
1
Feb 22
4408