Tower: upload laundry_management 19.0.19.0.4 (via marketplace)

This commit is contained in:
2026-05-01 15:00:35 +00:00
parent 4994547440
commit 8425e51ca4

View File

@@ -0,0 +1,28 @@
/** @odoo-module
*
* OrderTabs patch — gate every tab-driven order switch and the "+" new
* order button through pos.confirmExitSettleIfNeeded so the cashier
* cannot silently leave a live settle-due order behind.
*
* Both methods stay async to align with their existing signatures.
*/
import { patch } from "@web/core/utils/patch";
import { OrderTabs } from "@point_of_sale/app/components/order_tabs/order_tabs";
patch(OrderTabs.prototype, {
async selectFloatingOrder(order) {
const allowed = await this.pos.confirmExitSettleIfNeeded(order);
if (!allowed) {
return;
}
return super.selectFloatingOrder(order);
},
async newFloatingOrder() {
const allowed = await this.pos.confirmExitSettleIfNeeded(null);
if (!allowed) {
return;
}
return super.newFloatingOrder();
},
});