Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
5833 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Autor

This is not working my friend. :(

Autor Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
8
kvě 23
36325
1
úno 24
2499
1
čvc 23
3406
3
pro 23
19127
1
úno 22
6149