Fork of Odoo (formerly OpenERP). [This project is not publically mantained just born for internal usage with some little patches] go to official repository on github.com/odoo/odoo
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.
Based on PR https://github.com/odoo/odoo/pull/97864
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.