Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
1 Svar
7257 Visninger

is there a way to add the current date to the attachement name in the email template?


In the QWeb Reports it's possible to add the (time) from python, but in the e-mail it's not working. Any tips or solutions on this?

(object.state in ('draft', 'sent') and 'Invoice_%s_' % (object.name) +time.strftime('%d.%m.%Y')) or 'Invoice%s_'% (object.name) +time.strftime('%d.%m.%Y')

Thanks


Avatar
Kassér
Bedste svar

UPDATED FOR ODOO 17:


Hi,

Please try with this

${datetime.datetime.now().strftime('%d.%m.%Y')}

Avatar
Kassér
Forfatter

nice, this works!

Related Posts Besvarelser Visninger Aktivitet
1
feb. 24
2701
1
jul. 23
3580
0
apr. 23
91
1
nov. 22
2278
3
dec. 23
19271