Skip to Content
Menu
This question has been flagged
1 Reply
8072 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')"/>

                  </div>


Thanks

Avatar
Discard
Best Answer

Hello

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')"/>
Avatar
Discard
Author

It works! Thanks a lot!!!!!

Related Posts Replies Views Activity
0
Nov 24
237
0
Aug 24
351
1
Aug 24
587
4
Aug 24
70763
0
Jul 24
224