Technical Mailing lijst archieven


mail template (jinja2) - date format - month in french.

Ygol InternetWork, Yves Goldberg
- 22-06-2019 02:30:00
I need to insert a date in a mail template.

Using ${object.start_date} ----> 2019-10-30

I can get the required timezone format with:

${format_tz(object.start_date,'Europe/Paris','%d %B %Y')} ----> which give me "30 January 2019"

but the month is in English "January" and I would need it in french "Janvier".

In odoo code this use case is documented and I thought that using 
${format_tz(object.start_date, context={'use_babel': True, 'lang':'fr_FR'})}

would do it but it is not.

Can you point me to some existing example and/or documentation?

Thank you

Yves Goldberg