[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
This commit is contained in:
Joseph Caburnay
2023-04-13 15:26:46 +02:00
parent 8e2a293faf
commit 8e1c50eef9
@@ -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],
},
});
}