跳至内容
菜单
此问题已终结
1 回复
8845 查看

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
2218
0
8月 24
1800
1
8月 24
2871
4
8月 24
77734
0
7月 24
1445