From 8e1c50eef930b7b5e6de1eac4ed1711ca3d225ef Mon Sep 17 00:00:00 2001 From: Joseph Caburnay Date: Tue, 11 Apr 2023 13:29:26 +0000 Subject: [PATCH] [FIX] point_of_sale: access pos_session from the globalState Starting https://github.com/odoo/odoo/commit/40ac299c1d150192da5b4590a19092fda292f0b0, `env.pos` in each popup points to the PosStore instance. To access data from the original `pos` (instance of PosGlobalState), we can find it in the globalState field of the PosStore instance. Part-of: odoo/odoo#118226 --- addons/point_of_sale/static/src/js/Popups/ClosePosPopup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/Popups/ClosePosPopup.js b/addons/point_of_sale/static/src/js/Popups/ClosePosPopup.js index f1660e1c911..bfb8d07be21 100644 --- a/addons/point_of_sale/static/src/js/Popups/ClosePosPopup.js +++ b/addons/point_of_sale/static/src/js/Popups/ClosePosPopup.js @@ -93,7 +93,7 @@ export class ClosePosPopup extends AbstractAwaitablePopup { async downloadSalesReport() { await this.action.doAction("point_of_sale.sale_details_report", { additionalContext: { - active_ids: [this.env.pos.pos_session.id], + active_ids: [this.pos.globalState.pos_session.id], }, }); }