diff --git a/addons/point_of_sale/static/src/js/Screens/TicketScreen/TicketScreen.js b/addons/point_of_sale/static/src/js/Screens/TicketScreen/TicketScreen.js index 99ca55b6ac3..66a23aa76d2 100644 --- a/addons/point_of_sale/static/src/js/Screens/TicketScreen/TicketScreen.js +++ b/addons/point_of_sale/static/src/js/Screens/TicketScreen/TicketScreen.js @@ -233,6 +233,16 @@ odoo.define('point_of_sale.TicketScreen', function (require) { } //#endregion //#region PUBLIC METHODS + close() { + /** + * Automatically create new order when there is no currently active order. + * Important in fiscal modules to keep the sequence of the orders. + */ + if (this.env.pos.orders.length == 0) { + this.env.pos.add_new_order(); + } + super.close(); + } getSelectedSyncedOrder() { if (this._state.ui.filter == 'SYNCED') { return this._state.syncedOrders.cache[this._state.ui.selectedSyncedOrderId];