Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odgovori
5907 Prikazi

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
Opusti
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
Opusti
Avtor

This is not working my friend. :(

Avtor 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
Opusti
Related Posts Odgovori Prikazi Aktivnost
8
maj 23
36516
1
feb. 24
2622
1
jul. 23
3522
3
dec. 23
19221
1
feb. 22
6286