Browse Source

May 28: [FIX] Bug Fixed 'table_reservation_on_website'

pull/317/head
RisvanaCybro 11 months ago
parent
commit
daae3d29fe
  1. 2
      table_reservation_on_website/__manifest__.py
  2. 5
      table_reservation_on_website/doc/RELEASE_NOTES.md
  3. 15
      table_reservation_on_website/static/src/js/PaymentScreen.js

2
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.

5
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.

15
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()
}
}
});

Loading…
Cancel
Save