Odoo Help


2 Answers

Jérémy Kersten (jke)

--Jérémy Kersten (jke)--

| 4 4 11
Jodoigne, Belgium
--Jérémy Kersten (jke)--

Jérémy is a member of the core R&D team since september 2013.

He is now the Team Leader of the Website Team and support of our own website odoo.com.

Jérémy Kersten (jke)
2015/01/26 16:32


Have you try with tz_format ? From memory, it exists since saas-3 (So, it will not work in V7 :( ).


${format_tz(object.name,object.employee_id.address_id.tz or 'Europe/Brussels','%m/%d/%Y %H:%M')}


function format_tz(datetime, tz, format)}

datetime is required:
    Be aware that this will only work with datetime. Not a string, or a date    

tz is optional, function uses:
    - tz param
    - current user tz 
    - UTC

format is optional, function uses:
    - format param
    - format on lang in context
    - '%B-%d-%Y %I-%M %p (tz)'


Juan Formoso
2015/01/27 10:47

Thank you! You've explained it very well, but it's not working, it produces an error when the template is rendered. I'm using OpenERP7, does that work on it?

Jérémy Kersten (jke)
2015/01/27 11:24

Sorry, it's only since Saas-3, so it will not works... You can use an ugly hack with your date (spliting the string)... Euro Date = ${"%s/%s/%s" % (object.date_order[8:11], object.date_order[5:7], object.date_order[0:4])} Sorry, no more idea

Jérémy Kersten (jke)
2016/01/06 9:12

FYI: function format_tz(datetime, tz, format)}

Erwin van der Ploeg
2015/01/26 12:44

Somdone from odoo told me it not possible to change format. It is fixed in YYYY-MM-DD. Not implemented by them. 

Ask a Question
Keep Informed
3 follower(s)
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