Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
8772 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Penulis

It works! Thanks a lot!!!!!

Post Terkait Replies Tampilan Aktivitas
1
Des 24
2060
0
Agu 24
1662
1
Agu 24
2670
4
Agu 24
77169
0
Jul 24
1289