From d001a3a860bee69b7fe1226fb0a737131f8f2d25 Mon Sep 17 00:00:00 2001 From: Ethan Vincent Date: Tue, 23 Jan 2024 11:37:31 +0100 Subject: [PATCH] [FIX] hr_attendance: change logo route in kiosk **Current behavior:** Creating an additional company then creating an attendance kiosk link for it will not display this company's logo. --- **Expected behavior:** The kiosk page displays the logo for whichever company is actively selected when the link is generated --- **Steps to reproduce:** 1. Create a second company, set the logo to anything besides the default/fallback image 2. In the HR Attendance application settings, generate a kiosk link then paste & go in an incognito window 3. Observe the logo image displayed above the bar code is the default/fallback image --- **Cause of the issue:** The route being used to get the company's logo does not work for companies which are not the first/default one generated with the database. An accessibility check fails due to some information about the user's access rights not being available with the request. --- **Fix:** Use an alternative route which can properly access the logo image file of the company that is active when the kiosk link is generated. --- opw-3672577 closes odoo/odoo#150628 Signed-off-by: Sofie Gvaladze (sgv) --- .../static/src/public_kiosk/public_kiosk_app.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/addons/hr_attendance/static/src/public_kiosk/public_kiosk_app.js b/addons/hr_attendance/static/src/public_kiosk/public_kiosk_app.js index ea150f502b5..6a52009def1 100644 --- a/addons/hr_attendance/static/src/public_kiosk/public_kiosk_app.js +++ b/addons/hr_attendance/static/src/public_kiosk/public_kiosk_app.js @@ -28,10 +28,8 @@ class kioskAttendanceApp extends Component{ this.rpc = useService("rpc"); this.barcode = useService("barcode"); this.notification = useService("notification"); - this.companyImageUrl = url("/web/image", { - model: "res.company", - id: this.props.companyId, - field: "logo", + this.companyImageUrl = url("/web/binary/company_logo", { + company: this.props.companyId, }); this.lockScanner = false; if (this.props.kioskMode !== 'manual'){