콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

Hello, 

I have this email template:

The event ${object.event_id.name} that you registered for is confirmed and will be held from ${object.event_id.date_begin} to ${object.event_id.date_end}..

The fields date_begin e date_end are datetime fields and when the email is created the hour that appears is the date saved in database and not the hour in the correct timezone ...

Do you know if there is something like formatLag available in the reports?

Thanks

 

아바타
취소
베스트 답변

There is the email_template_dateutil module in OCA/server-tools:

https://github.com/OCA/server-tools/tree/7.0/email_template_dateutil

This module adds the format_date filter in the email template environment, and can be used like this:

${object.date_invoice|format_date("%m/%d/%Y")}

${object.some_datetime|format_date()}

This will use the current user's timezone by default, or the server timezone, or you can pass in your own timezone.

아바타
취소
베스트 답변

Hello!

What's the solution for this problem on Odoo 8?

Thank you

아바타
취소
베스트 답변

This one seems to do the job : https://github.com/odoo/odoo/issues/1108

아바타
취소
관련 게시물 답글 화면 활동
1
9월 17
14955
0
10월 16
5287
1
2월 19
7731
0
11월 16
3923
2
2월 24
4643