Browse Source

[FIX] pos_order_mgmt: loaded orders date to locale

pull/361/head
David 5 years ago
parent
commit
016d3238a8
  1. 2
      pos_order_mgmt/__manifest__.py
  2. 7
      pos_order_mgmt/static/src/js/widgets.js

2
pos_order_mgmt/__manifest__.py

@ -5,7 +5,7 @@
{
'name': 'POS Frontend Orders Management',
'summary': 'Manage old POS Orders from the frontend',
'version': '11.0.1.0.1',
'version': '11.0.1.0.2',
'category': 'Point of Sale',
'author': 'GRAP, '
'Tecnativa, '

7
pos_order_mgmt/static/src/js/widgets.js

@ -316,6 +316,13 @@ odoo.define('pos_order_mgmt.widgets', function (require) {
args: [query || '', this.pos.pos_session.id],
}).then(function (result) {
self.orders = result;
// Get the date in local time
_.each(self.orders, function (order) {
if (order.date_order) {
order.date_order = moment.utc(order.date_order)
.local().format('YYYY-MM-DD HH:mm:ss');
}
});
}).fail(function (error, event) {
if (parseInt(error.code, 10) === 200) {
// Business Logic Error, not a connection problem

Loading…
Cancel
Save