From fa9d207e67258b946b14b791ecf50f97bed8ed8d Mon Sep 17 00:00:00 2001 From: CarmenMiranda Date: Tue, 9 Aug 2022 23:44:01 +0000 Subject: [PATCH] [IMP] point_of_sale: Send Context Closing POS Session Sending a context when you are closing a `pos.session` will allow you to make some validations/actions only when the closing is being done from the UI. For example, sending values for new fields or a message that includes something from the pos, like the Cashier ID, name, etc. Also, it will help more when it is necessary to inherit the function in a simpler way, to avoid having to overwrite it. closes odoo/odoo#106044 X-original-commit: 3f7d6833b8c85a0c3469eced160bd72884c18d22 Signed-off-by: Trinh Jacky (trj) --- addons/point_of_sale/static/src/js/Popups/ClosePosPopup.js | 1 + 1 file changed, 1 insertion(+) 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 c86aef2683f..4efdf008f5a 100644 --- a/addons/point_of_sale/static/src/js/Popups/ClosePosPopup.js +++ b/addons/point_of_sale/static/src/js/Popups/ClosePosPopup.js @@ -130,6 +130,7 @@ odoo.define('point_of_sale.ClosePosPopup', function(require) { model: 'pos.session', method: 'close_session_from_ui', args: [this.env.pos.pos_session.id, bankPaymentMethodDiffPairs], + context: this.env.session.user_context, }); if (!response.successful) { return this.handleClosingError(response);