[FIX] pos_hr: correctly send back to login screen after cancelling badge
Current behavior: When a user scans a badge, the user is prompted to enter his pin. If you click on cancel on the pin window you would be sent directly in the pos and no user would be logged in. Steps to reproduce: - setup any employee badge with number and PIN - Enable Multi Employees per Session in POS settings - Open a new session for this POS - Scan the badge with barcode scanner - At password screen, click cancel - No employee is shown in the top right but the session can be used opw-3110299 closes odoo/odoo#111513 X-original-commit: 79a32fca91538a179a0f546a552176b46134c403 Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
This commit is contained in:
@@ -22,7 +22,7 @@ patch(LoginScreen.prototype, "pos_hr.LoginScreen methods", {
|
||||
}
|
||||
},
|
||||
async barcodeCashierAction(code) {
|
||||
if (await this._super(code)) {
|
||||
if (await this._super(code) && this.env.pos.get_cashier().id) {
|
||||
this.back();
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user