diff --git a/static/src/app/models/pos_order.js b/static/src/app/models/pos_order.js index fcc0825..6f2c93e 100644 --- a/static/src/app/models/pos_order.js +++ b/static/src/app/models/pos_order.js @@ -1,6 +1,7 @@ import { PosOrder } from "@point_of_sale/app/models/pos_order"; import { patch } from "@web/core/utils/patch"; import { _t } from "@web/core/l10n/translation"; +import { AlertDialog } from "@web/core/confirmation_dialog/confirmation_dialog"; import { transferState } from "../transfer_state"; patch(PosOrder.prototype, { @@ -45,10 +46,11 @@ patch(PosOrder.prototype, { line.setQuantity(lockedQty); return false; } - return { + this.models.pos.dialog.add(AlertDialog, { title: _t("Action Restricted"), body: _t("You cannot delete a product that has already been sent to the kitchen. Please call an Area Manager or Store Manager."), - }; + }); + return false; } else { // Recorded cancellation log for the deletion this.x_cancelled_lines = this.x_cancelled_lines || [];