diff --git a/pos_order_mgmt/__manifest__.py b/pos_order_mgmt/__manifest__.py index 9a63f15c..4b9238c2 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': '12.0.1.0.1', + 'version': '12.0.1.0.2', 'category': 'Point of Sale', 'author': 'GRAP, ' 'Tecnativa, ' diff --git a/pos_order_mgmt/i18n/pos_order_mgmt.pot b/pos_order_mgmt/i18n/pos_order_mgmt.pot index 937aee04..7d28f377 100644 --- a/pos_order_mgmt/i18n/pos_order_mgmt.pot +++ b/pos_order_mgmt/i18n/pos_order_mgmt.pot @@ -59,16 +59,16 @@ msgstr "" #. module: pos_order_mgmt #. openerp-web -#: code:addons/pos_order_mgmt/static/src/js/widgets.js:341 -#: code:addons/pos_order_mgmt/static/src/js/widgets.js:396 +#: code:addons/pos_order_mgmt/static/src/js/widgets.js:352 +#: code:addons/pos_order_mgmt/static/src/js/widgets.js:407 #, 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:340 -#: code:addons/pos_order_mgmt/static/src/js/widgets.js:395 +#: code:addons/pos_order_mgmt/static/src/js/widgets.js:351 +#: code:addons/pos_order_mgmt/static/src/js/widgets.js:406 #, python-format msgid "Connection error" msgstr "" @@ -173,7 +173,7 @@ msgstr "" #. module: pos_order_mgmt #. openerp-web -#: code:addons/pos_order_mgmt/static/src/js/widgets.js:242 +#: code:addons/pos_order_mgmt/static/src/js/widgets.js:253 #, python-format msgid "Refund " msgstr "" @@ -226,7 +226,7 @@ msgstr "" #. module: pos_order_mgmt #. openerp-web -#: code:addons/pos_order_mgmt/static/src/js/widgets.js:358 +#: code:addons/pos_order_mgmt/static/src/js/widgets.js:369 #, python-format msgid "Unable to load some order lines because the products are not available in the POS cache.\n" "\n" @@ -237,7 +237,7 @@ msgstr "" #. module: pos_order_mgmt #. openerp-web -#: code:addons/pos_order_mgmt/static/src/js/widgets.js:357 +#: code:addons/pos_order_mgmt/static/src/js/widgets.js:368 #, python-format msgid "Unknown Products" msgstr "" diff --git a/pos_order_mgmt/static/src/js/widgets.js b/pos_order_mgmt/static/src/js/widgets.js index 8d7630fa..9503b262 100644 --- a/pos_order_mgmt/static/src/js/widgets.js +++ b/pos_order_mgmt/static/src/js/widgets.js @@ -194,6 +194,17 @@ odoo.define('pos_order_mgmt.widgets', function (require) { this.gui.show_screen('receipt'); this.pos.reloaded_order = false; } + + // If it's invoiced, we also print the invoice + if (order_data.to_invoice) { + this.pos.chrome.do_action('point_of_sale.pos_invoice_report', { + additional_context: { active_ids: [order_data.id] } + }) + } + + // Destroy the order so it's removed from localStorage + // Otherwise it will stay there and reappear on browser refresh + order.destroy(); }, action_copy: function (order_data, order) {