Browse Source

Merge PR #361 into 11.0

Signed-off-by pedrobaeza
pull/339/head
OCA-git-bot 5 years ago
parent
commit
833c66f174
  1. 2
      pos_order_mgmt/__manifest__.py
  2. 4
      pos_order_mgmt/i18n/pos_order_mgmt.pot
  3. 7
      pos_order_mgmt/static/src/js/widgets.js

2
pos_order_mgmt/__manifest__.py

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

4
pos_order_mgmt/i18n/pos_order_mgmt.pot

@ -40,7 +40,7 @@ msgstr ""
#. module: pos_order_mgmt #. module: pos_order_mgmt
#. openerp-web #. openerp-web
#: code:addons/pos_order_mgmt/static/src/js/widgets.js:303 #: code:addons/pos_order_mgmt/static/src/js/widgets.js:303
#: code:addons/pos_order_mgmt/static/src/js/widgets.js:331
#: code:addons/pos_order_mgmt/static/src/js/widgets.js:338
#, python-format #, python-format
msgid "Can not execute this action because the POS is currently offline" msgid "Can not execute this action because the POS is currently offline"
msgstr "" msgstr ""
@ -48,7 +48,7 @@ msgstr ""
#. module: pos_order_mgmt #. module: pos_order_mgmt
#. openerp-web #. openerp-web
#: code:addons/pos_order_mgmt/static/src/js/widgets.js:302 #: code:addons/pos_order_mgmt/static/src/js/widgets.js:302
#: code:addons/pos_order_mgmt/static/src/js/widgets.js:330
#: code:addons/pos_order_mgmt/static/src/js/widgets.js:337
#, python-format #, python-format
msgid "Connection error" msgid "Connection error"
msgstr "" msgstr ""

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], args: [query || '', this.pos.pos_session.id],
}).then(function (result) { }).then(function (result) {
self.orders = 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) { }).fail(function (error, event) {
if (parseInt(error.code, 10) === 200) { if (parseInt(error.code, 10) === 200) {
// Business Logic Error, not a connection problem // Business Logic Error, not a connection problem

Loading…
Cancel
Save