From 0af53fdce3ce8b08b01808739e0ac0b0effc158b Mon Sep 17 00:00:00 2001 From: Pierrick Brun Date: Tue, 26 Mar 2019 14:26:51 +0100 Subject: [PATCH 1/5] [FIX] compatibility with pos_restaurant --- pos_order_mgmt/readme/CONTRIBUTORS.rst | 1 + pos_order_mgmt/static/src/js/widgets.js | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pos_order_mgmt/readme/CONTRIBUTORS.rst b/pos_order_mgmt/readme/CONTRIBUTORS.rst index 3020f433..bdac6f44 100644 --- a/pos_order_mgmt/readme/CONTRIBUTORS.rst +++ b/pos_order_mgmt/readme/CONTRIBUTORS.rst @@ -1,3 +1,4 @@ * David Vidal * Sylvain LE GAL (https://twitter.com/legalsylvain) * Carlos Martínez +* Pierrick Brun diff --git a/pos_order_mgmt/static/src/js/widgets.js b/pos_order_mgmt/static/src/js/widgets.js index 22d844c3..67e72e4d 100644 --- a/pos_order_mgmt/static/src/js/widgets.js +++ b/pos_order_mgmt/static/src/js/widgets.js @@ -63,7 +63,10 @@ odoo.define('pos_order_mgmt.widgets', function (require) { show: function () { var self = this; - var previous_screen = this.pos.get_order().get_screen_data('previous-screen'); + var previous_screen; + if (this.pos.get_order()) { + previous_screen = this.pos.get_order().get_screen_data('previous-screen'); + } if (previous_screen === 'receipt') { this.gui.screen_instances.receipt.click_next(); this.gui.show_screen('orderlist'); @@ -267,7 +270,7 @@ odoo.define('pos_order_mgmt.widgets', function (require) { method: 'load_done_order_for_pos', args: [order_id], }).then(function (order_data) { - self.gui.back(); + self.gui.show_screen('orderlist'); var correct_order_print = true; if (action === 'return') { order_data.return = true; From 13b321bdebce66699dc1a50ef89b2e4ac330acd6 Mon Sep 17 00:00:00 2001 From: Carlos Date: Mon, 8 Apr 2019 11:11:05 +0200 Subject: [PATCH 2/5] [FIX] pos_order_mgmt:compatibility with pos_restaurant --- pos_order_mgmt/static/src/js/widgets.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pos_order_mgmt/static/src/js/widgets.js b/pos_order_mgmt/static/src/js/widgets.js index 67e72e4d..420b9ca8 100644 --- a/pos_order_mgmt/static/src/js/widgets.js +++ b/pos_order_mgmt/static/src/js/widgets.js @@ -75,7 +75,11 @@ odoo.define('pos_order_mgmt.widgets', function (require) { this.renderElement(); this.old_order = this.pos.get_order(); this.$('.back').click(function () { + if (self.old_order !== null) { + self.gui.back(); + } else { return self.gui.show_screen(self.gui.startup_screen); + } }); if (self.orders.length === 0) { this.search_done_orders(); @@ -270,7 +274,9 @@ odoo.define('pos_order_mgmt.widgets', function (require) { method: 'load_done_order_for_pos', args: [order_id], }).then(function (order_data) { - self.gui.show_screen('orderlist'); + if (self.old_order !== null) { + self.gui.back(); + } var correct_order_print = true; if (action === 'return') { order_data.return = true; From 6968c6adcc173b695d22c0933c5c32823fe2ebe7 Mon Sep 17 00:00:00 2001 From: oca-travis Date: Tue, 16 Jul 2019 09:33:37 +0000 Subject: [PATCH 3/5] [UPD] Update pos_order_mgmt.pot --- pos_order_mgmt/i18n/pos_order_mgmt.pot | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pos_order_mgmt/i18n/pos_order_mgmt.pot b/pos_order_mgmt/i18n/pos_order_mgmt.pot index 7e9f9de3..535c1055 100644 --- a/pos_order_mgmt/i18n/pos_order_mgmt.pot +++ b/pos_order_mgmt/i18n/pos_order_mgmt.pot @@ -39,16 +39,16 @@ msgstr "" #. module: pos_order_mgmt #. openerp-web -#: code:addons/pos_order_mgmt/static/src/js/widgets.js:303 -#: code:addons/pos_order_mgmt/static/src/js/widgets.js:338 +#: code:addons/pos_order_mgmt/static/src/js/widgets.js:312 +#: code:addons/pos_order_mgmt/static/src/js/widgets.js:347 #, python-format msgid "Can not execute this action because the POS is currently offline" msgstr "" #. module: pos_order_mgmt #. openerp-web -#: code:addons/pos_order_mgmt/static/src/js/widgets.js:302 -#: code:addons/pos_order_mgmt/static/src/js/widgets.js:337 +#: code:addons/pos_order_mgmt/static/src/js/widgets.js:311 +#: code:addons/pos_order_mgmt/static/src/js/widgets.js:346 #, python-format msgid "Connection error" msgstr "" @@ -128,7 +128,7 @@ msgstr "" #. module: pos_order_mgmt #. openerp-web -#: code:addons/pos_order_mgmt/static/src/js/widgets.js:280 +#: code:addons/pos_order_mgmt/static/src/js/widgets.js:289 #, python-format msgid "Unable to load some order lines because the products are not available in the POS cache.\n" "\n" @@ -139,7 +139,7 @@ msgstr "" #. module: pos_order_mgmt #. openerp-web -#: code:addons/pos_order_mgmt/static/src/js/widgets.js:279 +#: code:addons/pos_order_mgmt/static/src/js/widgets.js:288 #, python-format msgid "Unknown Products" msgstr "" From ca589cab720ba9ae60359d6bf18c59d9849cf11f Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Tue, 16 Jul 2019 09:50:10 +0000 Subject: [PATCH 4/5] [UPD] README.rst --- pos_order_mgmt/README.rst | 1 + pos_order_mgmt/static/description/index.html | 1 + 2 files changed, 2 insertions(+) diff --git a/pos_order_mgmt/README.rst b/pos_order_mgmt/README.rst index cc739d09..038ee3dd 100644 --- a/pos_order_mgmt/README.rst +++ b/pos_order_mgmt/README.rst @@ -105,6 +105,7 @@ Contributors * David Vidal * Sylvain LE GAL (https://twitter.com/legalsylvain) * Carlos Martínez +* Pierrick Brun Maintainers ~~~~~~~~~~~ diff --git a/pos_order_mgmt/static/description/index.html b/pos_order_mgmt/static/description/index.html index 19661a9c..bf6d2c62 100644 --- a/pos_order_mgmt/static/description/index.html +++ b/pos_order_mgmt/static/description/index.html @@ -452,6 +452,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
  • David Vidal <david.vidal@tecnativa.com>
  • Sylvain LE GAL (https://twitter.com/legalsylvain)
  • Carlos Martínez <carlos@domatix.com>
  • +
  • Pierrick Brun <pierrick.brun@akretion.com>
  • From e12d6d7aba453ccf75d181970e579c825084aca2 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Tue, 16 Jul 2019 09:50:10 +0000 Subject: [PATCH 5/5] pos_order_mgmt 11.0.1.0.3 --- pos_order_mgmt/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pos_order_mgmt/__manifest__.py b/pos_order_mgmt/__manifest__.py index f17ea7bc..602dcfb7 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.2', + 'version': '11.0.1.0.3', 'category': 'Point of Sale', 'author': 'GRAP, ' 'Tecnativa, '