Odoo Help

Welcome!

This community 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.

0

How to show the time/date of printing in a report? [nearly solved]

By
Tobias Frankl
on 2/22/15, 10:31 AM 667 views

Report has the module "time": 

I am trying quite some time to find the synthax: This and worse:

<li t-if="time.time()">Gedruckt von: <span t-field="time.time()"/></li>

Could somebody give me a line of code?

1

zbik

--zbik--
5941
| 6 4 7
Lodz, Poland
--zbik--


zbik
On 2/22/15, 10:38 AM

Try like this:

                <span t-esc="time.strftime('%Y-%m-%d')"/>
                <span t-esc="time.strftime('%H:%M')"/>

 

That was the fastest response on the forum, ever :-) Thanks, now I have some date and time on my report. Is this time the "user time" or some server time? I ask, because there is one hour difference on the report to real time. It's Summer time, possible? Wrong timezone on server? utc?

Tobias Frankl
on 2/22/15, 10:58 AM

Server time in the chat module is correct. checked that. So maybe a timezone problem?

Tobias Frankl
on 2/22/15, 11:02 AM

See this question and link to commit, in my last comment: https://www.odoo.com/forum/help-1/question/reports-displays-utc-rather-than-local-time-76504

zbik
on 2/22/15, 11:06 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 2/22/15, 10:31 AM
Seen: 667 times
Last updated: 3/16/15, 8:10 AM