Odoo Help


What are options to format date in the POS receipt?

Pascal Tremblay
on 3/18/15, 10:29 AM 2,033 views

Hello everybody,

I would want to know possibilities to format date at the top of the POS receipt.

My goal : I want the date like this « 3 janvier 2015 ».

Actually, in the file /home/odoo-test/odoo-test/addons/point_of_sale/static/src/xml/pos.xml :

      <t t-name="PosTicket">

              <div class="pos-sale-ticket" style="font-family: 'Ubuntu';">

                  <div class="pos-center-align">

                      <t t-esc="new Date().toString(Date.CultureInfo.formatPatterns.shortDate + ' ' +

                          Date.CultureInfo.formatPatterns.longTime)"/><br />

                      <t t-esc="order.get('name')"/>




Jérémy Kersten (jke)

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

| 3 3 5
Jodoigne, Belgium
--Jérémy Kersten (jke)--

Jérémy is a member of the core R&D team since september 2013. He developed several projects for OpenERP version 8 including the eCommerce, the Google Calendar synchronization and the new product variants/configurator. Now, he manages Odoo website and themes for saas.

Jérémy Kersten (jke)
On 3/21/15, 1:40 PM


This should do the trick.

But you break the language format... (Take a look here for more format : https://code.google.com/p/datejs/wiki/FormatSpecifiers)

<t t-esc="new Date().toString('d MMMM yyyy')"/>

It works! Thanks a lot!!!!!

Pascal Tremblay
on 3/21/15, 5:10 PM

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

Question tools

1 follower(s)


Asked: 3/18/15, 10:29 AM
Seen: 2033 times
Last updated: 6/21/16, 7:12 AM