diff --git a/addons/point_of_sale/i18n/point_of_sale.pot b/addons/point_of_sale/i18n/point_of_sale.pot index bdbff2aafdb..b776ac2e04e 100644 --- a/addons/point_of_sale/i18n/point_of_sale.pot +++ b/addons/point_of_sale/i18n/point_of_sale.pot @@ -3092,6 +3092,7 @@ msgstr "" #. module: point_of_sale #. openerp-web #: code:addons/point_of_sale/static/src/js/Chrome.js:0 +#: code:addons/point_of_sale/static/src/js/Screens/ProductScreen/ProductScreen.js:0 #, python-format msgid "No" msgstr "" @@ -5246,6 +5247,13 @@ msgid "" "Cash Registers: %r" msgstr "" +#. module: point_of_sale +#. openerp-web +#: code:addons/point_of_sale/static/src/js/Screens/ProductScreen/ProductScreen.js:0 +#, python-format +msgid "Some Serial/Lot Numbers are missing" +msgstr "" + #. module: point_of_sale #. openerp-web #: code:addons/point_of_sale/static/src/js/Chrome.js:0 @@ -6478,7 +6486,9 @@ msgstr "" #. module: point_of_sale #. openerp-web +#: code:addons/point_of_sale/models/pos_config.py:0 #: code:addons/point_of_sale/static/src/js/Chrome.js:0 +#: code:addons/point_of_sale/static/src/js/Screens/ProductScreen/ProductScreen.js:0 #, python-format msgid "Yes" msgstr "" @@ -6498,6 +6508,15 @@ msgstr "" msgid "You are not allowed to change this quantity" msgstr "" +#. module: point_of_sale +#. openerp-web +#: code:addons/point_of_sale/static/src/js/Screens/ProductScreen/ProductScreen.js:0 +#, python-format +msgid "" +"You are trying to sell products with serial/lot numbers, but some of them are not set.\n" +"Would you like to proceed anyway?" +msgstr "" + #. module: point_of_sale #: code:addons/point_of_sale/models/account_bank_statement.py:0 #, python-format diff --git a/addons/point_of_sale/static/src/js/Screens/ProductScreen/ProductScreen.js b/addons/point_of_sale/static/src/js/Screens/ProductScreen/ProductScreen.js index 35851cd89be..edffce56ee4 100644 --- a/addons/point_of_sale/static/src/js/Screens/ProductScreen/ProductScreen.js +++ b/addons/point_of_sale/static/src/js/Screens/ProductScreen/ProductScreen.js @@ -353,8 +353,20 @@ odoo.define('point_of_sale.ProductScreen', function(require) { this.currentOrder.updatePricelist(newPartner); } } - _onClickPay() { - this.showScreen('PaymentScreen'); + async _onClickPay() { + if (this.env.pos.get_order().orderlines.some(line => line.get_product().tracking !== 'none' && !line.has_valid_product_lot()) && (this.env.pos.picking_type.use_create_lots || this.env.pos.picking_type.use_existing_lots)) { + const { confirmed } = await this.showPopup('ConfirmPopup', { + title: this.env._t('Some Serial/Lot Numbers are missing'), + body: this.env._t('You are trying to sell products with serial/lot numbers, but some of them are not set.\nWould you like to proceed anyway?'), + confirmText: this.env._t('Yes'), + cancelText: this.env._t('No') + }); + if (confirmed) { + this.showScreen('PaymentScreen'); + } + } else { + this.showScreen('PaymentScreen'); + } } switchPane() { this.state.mobile_pane = this.state.mobile_pane === "left" ? "right" : "left";