diff --git a/pos_ticket_payment/__manifest__.py b/pos_ticket_payment/__manifest__.py new file mode 100644 index 00000000000..32681ae704b --- /dev/null +++ b/pos_ticket_payment/__manifest__.py @@ -0,0 +1,29 @@ +{ + "name": "POS Ticket Payment", + "summary": "Enable direct payment from the ticket screen in POS", + "description": """ +POS Ticket Payment +================== + +This module enhances the Point of Sale interface by allowing users to initiate payment directly from the ticket (order) screen. + +Key Features: +------------- +- Adds a "Payment" button next to the "Load" button on the ticket screen. +- Clicking "Payment" will load the selected order and navigate to the payment screen. +- Speeds up the checkout process for saved orders. + +Ideal for fast-paced retail environments where quick payment access is essential. +""", + "license": "AGPL-3", + "application": True, + "installable": True, + "depends": ["point_of_sale"], + "author": "Dhruvrajsinh Zala (zadh)", + "version": "0.1", + "assets": { + "point_of_sale._assets_pos": [ + "pos_ticket_payment/static/src/app/**/*" + ] + } +} diff --git a/pos_ticket_payment/static/src/app/screens/ticket_screen/ticket_screen.js b/pos_ticket_payment/static/src/app/screens/ticket_screen/ticket_screen.js new file mode 100644 index 00000000000..8f0c0a67ef7 --- /dev/null +++ b/pos_ticket_payment/static/src/app/screens/ticket_screen/ticket_screen.js @@ -0,0 +1,9 @@ +import { TicketScreen } from '@point_of_sale/app/screens/ticket_screen/ticket_screen'; +import { patch } from '@web/core/utils/patch'; + +patch(TicketScreen.prototype, { + async onPayClick() { + this.pos.set_order(this.getSelectedOrder()); + this.pos.pay(); + }, +}); diff --git a/pos_ticket_payment/static/src/app/screens/ticket_screen/ticket_screen.xml b/pos_ticket_payment/static/src/app/screens/ticket_screen/ticket_screen.xml new file mode 100644 index 00000000000..62473a40acb --- /dev/null +++ b/pos_ticket_payment/static/src/app/screens/ticket_screen/ticket_screen.xml @@ -0,0 +1,11 @@ + + + + + + + + + + +