feat: disable kitchen ticket reprint functionality in POS ticket screen

This commit is contained in:
Suherdy Yacob 2026-05-12 16:01:50 +07:00
parent 86ee02c030
commit 36c94bb528
3 changed files with 10 additions and 18 deletions

View File

@ -6,7 +6,6 @@ This module adds support for generic network ESC/POS thermal printers in the Poi
- Add basic raw network printing over IP using port 9100 without relying on IoT box or EPSON-only support. - Add basic raw network printing over IP using port 9100 without relying on IoT box or EPSON-only support.
- Configurable per-printer IP address directly under Point of Sale -> Printers settings. - Configurable per-printer IP address directly under Point of Sale -> Printers settings.
- Formats standard kitchen receipt containing products, quantity, and internal notes (without prices). - Formats standard kitchen receipt containing products, quantity, and internal notes (without prices).
- Replaces/upgrades the POS ticket screen's existing hidden reprint functionality with highly visible 'Reprint Kitchen Checker' buttons.
## Setup ## Setup
- Go to POS Configuration -> Printers - Go to POS Configuration -> Printers

View File

@ -1,22 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve"> <templates id="template" xml:space="preserve">
<!-- Add Reprint Kitchen Button to Synced Orders (Right Pane underneath details) -->
<t t-name="pos_kitchen_printer.TicketScreen" t-inherit="point_of_sale.TicketScreen" t-inherit-mode="extension"> <t t-name="pos_kitchen_printer.TicketScreen" t-inherit="point_of_sale.TicketScreen" t-inherit-mode="extension">
<xpath expr="//button[hasclass('edit-order-payment')]" position="after"> <!-- Hide the existing reprint button -->
<button t-if="this.pos.unwatched.printers.length" <xpath expr="//button[contains(@t-on-click, 'onClickReprintAll')]" position="replace"/>
class="control-button btn btn-secondary btn-lg lh-lg flex-grow-1 flex-shrink-1"
t-on-click="() => this.onClickReprintAll(_selectedSyncedOrder)">
<i class="fa fa-cutlery me-1" /> Reprint Kitchen Checker
</button>
</xpath>
<!-- Enhance the existing cutlery button for unsynced orders -->
<xpath expr="//button[contains(@t-on-click, 'onClickReprintAll') and hasclass('d-flex')]" position="replace">
<button class="button btn btn-secondary btn-lg d-flex flex-row align-items-center justify-content-center flex-grow-1"
t-on-click="() => this.onClickReprintAll(_selectedSyncedOrder)"
t-if="this.pos.unwatched.printers.length and _selectedSyncedOrder.uiState.lastPrints.length">
<i class="fa fa-cutlery me-1" aria-hidden="true"/> Reprint Kitchen Checker
</button>
</xpath>
</t> </t>
</templates> </templates>

View File

@ -2,6 +2,13 @@
import { patch } from "@web/core/utils/patch"; import { patch } from "@web/core/utils/patch";
import { PosStore } from "@point_of_sale/app/services/pos_store"; import { PosStore } from "@point_of_sale/app/services/pos_store";
import { TicketScreen } from "@point_of_sale/app/screens/ticket_screen/ticket_screen";
patch(TicketScreen.prototype, {
async onClickReprintAll(order) {
// Feature disabled as per user request
},
});
patch(PosStore.prototype, { patch(PosStore.prototype, {
createPrinter(config) { createPrinter(config) {