[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) <sgv@odoo.com>
This commit is contained in:
Ethan Vincent
2024-01-30 18:05:57 +00:00
parent e7afb81885
commit d001a3a860
@@ -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'){