diff --git a/table_reservation_on_website/__manifest__.py b/table_reservation_on_website/__manifest__.py index d5f557835..49b8896f1 100644 --- a/table_reservation_on_website/__manifest__.py +++ b/table_reservation_on_website/__manifest__.py @@ -21,7 +21,7 @@ ############################################################################### { 'name': 'Table Reservation on Website', - 'version': '17.0.1.0.0', + 'version': '17.0.1.0.1', 'category': 'eCommerce,Point of Sale', 'summary': 'Reserve tables in POS from website', 'description': """This module enables to reserve tables in POS from website. diff --git a/table_reservation_on_website/doc/RELEASE_NOTES.md b/table_reservation_on_website/doc/RELEASE_NOTES.md index e9a1bcdd2..d3728cac3 100644 --- a/table_reservation_on_website/doc/RELEASE_NOTES.md +++ b/table_reservation_on_website/doc/RELEASE_NOTES.md @@ -4,3 +4,8 @@ #### Version 17.0.1.0.0 ##### ADD - Initial commit for Table Reservation on Website + +#### 27.05.2024 +#### Version 17.0.1.0.1 +##### UPDT +- Issue solved on the pos payment screen. \ No newline at end of file diff --git a/table_reservation_on_website/static/src/js/PaymentScreen.js b/table_reservation_on_website/static/src/js/PaymentScreen.js index a8a81e93d..e3f2d4e1b 100644 --- a/table_reservation_on_website/static/src/js/PaymentScreen.js +++ b/table_reservation_on_website/static/src/js/PaymentScreen.js @@ -1,19 +1,28 @@ /** @odoo-module **/ +import { _t } from "@web/core/l10n/translation"; import { PaymentScreen } from "@point_of_sale/app/screens/payment_screen/payment_screen"; import { jsonrpc } from "@web/core/network/rpc_service"; import { patch } from "@web/core/utils/patch"; +import { ConfirmPopup } from "@point_of_sale/app/utils/confirm_popup/confirm_popup"; patch(PaymentScreen.prototype, { /** For payment validation in pos **/ async _finalizeValidation() { - var self = this let customer = this.currentOrder.get_partner(); - ajax.jsonRpc('/table/reservation/pos','call',{ + if (!customer){ + await this.popup.add(ConfirmPopup, { + title: _t("Customer Required"), + body: _t("Customer is required."), + }) + } + else{ + jsonrpc('/table/reservation/pos',{ 'partner_id' : customer.id, 'table_id': this.currentOrder.tableId - }).then( function(data){}); + }).then( function(data){}) return super._finalizeValidation() } + } });