feat: disable kitchen ticket reprint functionality in POS ticket screen
This commit is contained in:
parent
86ee02c030
commit
36c94bb528
@ -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.
|
||||
- Configurable per-printer IP address directly under Point of Sale -> Printers settings.
|
||||
- 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
|
||||
- Go to POS Configuration -> Printers
|
||||
|
||||
@ -1,22 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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">
|
||||
<xpath expr="//button[hasclass('edit-order-payment')]" position="after">
|
||||
<button t-if="this.pos.unwatched.printers.length"
|
||||
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>
|
||||
<!-- Hide the existing reprint button -->
|
||||
<xpath expr="//button[contains(@t-on-click, 'onClickReprintAll')]" position="replace"/>
|
||||
</t>
|
||||
</templates>
|
||||
|
||||
|
||||
@ -2,6 +2,13 @@
|
||||
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
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, {
|
||||
createPrinter(config) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user