Only editing the template is not possible to fix this. Not only the format is wrong even the timezone is alway UTC and this is confusing if your are outside UTC.
A workaround is to defined a new field as function:
def _get_date_for_email(self, cr, uid, ids, field_name, arg, context=None):
reads = self.browse(cr, uid, ids, context)
result = {}
for obj in reads:
utc = datetime.strptime(obj.date, '%Y-%m-%d %H:%M:%S').replace(tzinfo=pytz.timezone('UTC'))
#FIXME: can we read timezone from context?
#if 'tz' in context:
# to_zone = tz.gettz(context['tz'])
#else:
to_zone = tz.gettz('Europe/Berlin')
meeting_date = utc.astimezone(to_zone)
#TODO: Make formating here
result[obj.id] = "%s" % meeting_date
return result
_columns = {
'date_for_email' : fields.function(
_get_date_for_email,
type='char',
readonly=True,
string='Date Formated'),
}
Maybe we need a more generic solution of this. The OpenERP Support offer me to develop a private patch but not merging to stable.
I think a small community module should be the best way. So we will work on this.
Hey I am looking for the answer as well. Did you get any solution for this?
Hello, I am looking also for the answer.