Odoo Help

0

How to format data['form']['date_start'] to get the month name in letters?

By
Pascal Tremblay
on 11/18/15, 2:31 PM 847 views

Hello all,

In a qweb report I have this code to format a date :

    <span t-esc="formatLang(data['form']['date_start'],date=True)"/>

It displays the date like this : 18.11.2015

But I want the month in letter like this : 18 novembre 2015

I have tried many things.

How could I get this format please?


UPDATE #1

With the print date of the report, this one works well :

     <strong>Print Date</strong> :<br/>
    <span t-esc="time.strftime('%e %B %Y')" />


0

Pascal Tremblay

--Pascal Tremblay--
1592
| 5 2 7
Alma, Canada
--Pascal Tremblay--


Pascal Tremblay
On 11/18/15, 4:12 PM

Hey gang!

This code works very well for me :

 <div class="col-xs-3">     
    <strong>End Period</strong> :<br/>     
    <span t-esc="time.strftime('%d %B %Y',time.strptime(data['form']['date_end'],'%Y-%m-%d'))"/>
</div>

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.

Register

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)

Stats

Asked: 11/18/15, 2:31 PM
Seen: 847 times
Last updated: 11/18/15, 4:12 PM