跳至內容
選單
此問題已被標幟
1 回覆
8832 瀏覽次數

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

頭像
捨棄
最佳答案

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')"/>
頭像
捨棄
作者

It works! Thanks a lot!!!!!

相關帖文 回覆 瀏覽次數 活動
1
12月 24
2182
0
8月 24
1781
1
8月 24
2825
4
8月 24
77565
0
7月 24
1424