Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
5830 Vistas

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
Descartar
Mejor respuesta

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
Descartar
Autor

This is not working my friend. :(

Autor Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
8
may 23
36320
1
feb 24
2497
1
jul 23
3402
3
dic 23
19127
1
feb 22
6147