diff --git a/addons/pos_restaurant/static/src/overrides/components/navbar/navbar.js b/addons/pos_restaurant/static/src/overrides/components/navbar/navbar.js index 5cd12998ea9e6..1a291c986862a 100644 --- a/addons/pos_restaurant/static/src/overrides/components/navbar/navbar.js +++ b/addons/pos_restaurant/static/src/overrides/components/navbar/navbar.js @@ -1,7 +1,6 @@ import { Navbar } from "@point_of_sale/app/components/navbar/navbar"; import { patch } from "@web/core/utils/patch"; import { _t } from "@web/core/l10n/translation"; -import { AlertDialog } from "@web/core/confirmation_dialog/confirmation_dialog"; import { getButtons, EMPTY, ZERO, BACKSPACE } from "@point_of_sale/app/components/numpad/numpad"; import { TableSelector } from "./table_selector/table_selector"; @@ -69,11 +68,10 @@ patch(Navbar.prototype, { return this.setFloatingOrder(floating_order); } if (!table && !floating_order) { - this.dialog.add(AlertDialog, { - title: _t("Error"), - body: _t("No table or floating order found with this number"), - }); - return; + const newOrder = this.pos.add_new_order(); + newOrder.floating_order_name = table_number; + newOrder.setBooked(true); + return this.setFloatingOrder(newOrder); } }, });