From 016d3238a88a9a05d62a4b46b5f46f7184295955 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 19 Jun 2019 18:16:51 +0200 Subject: [PATCH] [FIX] pos_order_mgmt: loaded orders date to locale --- pos_order_mgmt/__manifest__.py | 2 +- pos_order_mgmt/static/src/js/widgets.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pos_order_mgmt/__manifest__.py b/pos_order_mgmt/__manifest__.py index d90bc1c6..f17ea7bc 100644 --- a/pos_order_mgmt/__manifest__.py +++ b/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, ' diff --git a/pos_order_mgmt/static/src/js/widgets.js b/pos_order_mgmt/static/src/js/widgets.js index 74ba42ed..22d844c3 100644 --- a/pos_order_mgmt/static/src/js/widgets.js +++ b/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