Tower: upload laundry_management 19.0.19.0.4 (via marketplace)

This commit is contained in:
2026-05-01 15:00:21 +00:00
parent 12edb222fe
commit 23a254a556

View File

@@ -0,0 +1,21 @@
/** @odoo-module
*
* Navbar patch — gate the POS-logo "register" click so cashiers can't
* silently abandon a settle-due order by clicking back to the home/
* register screen.
*
* The original onClickRegister is sync; we make ours async and the
* existing OWL bindings still work (they fire-and-forget).
*/
import { patch } from "@web/core/utils/patch";
import { Navbar } from "@point_of_sale/app/components/navbar/navbar";
patch(Navbar.prototype, {
async onClickRegister() {
const allowed = await this.pos.confirmExitSettleIfNeeded(null);
if (!allowed) {
return;
}
return super.onClickRegister();
},
});