Skip to content
Snippets Groups Projects
Commit 3f7d6833 authored by CarmenMiranda's avatar CarmenMiranda
Browse files

[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#97864

Signed-off-by: default avatarTrinh Jacky (trj) <trj@odoo.com>
parent aa0fb325
Branches
Tags
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment