Odoo Help


Server actions E-mail - format dates and translate terms

Bertrand RETIF
on 3/11/13, 12:12 PM 2,058 views


I want to use server actions to send mail in different steps of a workflow.

I can send mail, however impossible to change the format of date of to translate the terms in the mail.

For instance in my mail if I try to use:

[[ formatLang(object.date_from,date=True) ]]

I get this error:

   openerp.tools.safe_eval: Cannot eval 'formatLang(object.date_from,date=True)'

Same problem if I try to use:

  [[ _(object.employee_id.name) ]]

Do someone find a solution to format mail or translate terms in server actions?

Thanks by advance for your help.

I would expect a syntax more like this: &nbsp;&nbsp;Date: ${formatLang(object.date_order,date=True)}<br />. Nevertheless, it doesn't work on my side too

Christian Douville
on 4/3/13, 3:57 PM
Mohammed Mansour
On 3/17/15, 7:24 AM

You can do the following solution

Replace: ${object.datetime_field}

With: ${object.datetime_field.split(' ')[0]}

and you can play with as needed.


You can view this link to know how to change email templates date format: 


Bertrand RETIF
On 4/4/13, 5:40 AM

I contacted OpenERP and the answer is: 'It is not possible with the current framework'

I hope it will be added in future release....

+1 new hoping user! :)

on 5/24/13, 9:10 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 3/11/13, 12:12 PM
Seen: 2058 times
Last updated: 3/17/15, 9:14 AM