Browse Source

Merge PR #378 into 12.0

Signed-off-by legalsylvain
pull/380/head
OCA-git-bot 5 years ago
parent
commit
7e5aacd462
  1. 2
      pos_order_mgmt/__manifest__.py
  2. 14
      pos_order_mgmt/i18n/pos_order_mgmt.pot
  3. 11
      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': '12.0.1.0.1',
'version': '12.0.1.0.2',
'category': 'Point of Sale', 'category': 'Point of Sale',
'author': 'GRAP, ' 'author': 'GRAP, '
'Tecnativa, ' 'Tecnativa, '

14
pos_order_mgmt/i18n/pos_order_mgmt.pot

@ -59,16 +59,16 @@ msgstr ""
#. module: pos_order_mgmt #. module: pos_order_mgmt
#. openerp-web #. 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 #, 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 ""
#. module: pos_order_mgmt #. module: pos_order_mgmt
#. openerp-web #. 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 #, python-format
msgid "Connection error" msgid "Connection error"
msgstr "" msgstr ""
@ -173,7 +173,7 @@ msgstr ""
#. module: pos_order_mgmt #. module: pos_order_mgmt
#. openerp-web #. 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 #, python-format
msgid "Refund " msgid "Refund "
msgstr "" msgstr ""
@ -226,7 +226,7 @@ msgstr ""
#. module: pos_order_mgmt #. module: pos_order_mgmt
#. openerp-web #. 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 #, python-format
msgid "Unable to load some order lines because the products are not available in the POS cache.\n" msgid "Unable to load some order lines because the products are not available in the POS cache.\n"
"\n" "\n"
@ -237,7 +237,7 @@ msgstr ""
#. module: pos_order_mgmt #. module: pos_order_mgmt
#. openerp-web #. 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 #, python-format
msgid "Unknown Products" msgid "Unknown Products"
msgstr "" msgstr ""

11
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.gui.show_screen('receipt');
this.pos.reloaded_order = false; 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) { action_copy: function (order_data, order) {

Loading…
Cancel
Save