[FIX] pos_hr: Avatar display error
If the user only has "Point of Sale" permission but not "Employees" permission, the image will not be displayed using the link "/web/image/hr.employee/${cashier.id}/avatar_128"
instead use "/web/image/hr.employee.public/${cashier.id}/avatar_128"
closes odoo/odoo#130566
X-original-commit: 152e1a360fad3de1bc5363bf476e26f48563e5c0
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
This commit is contained in:
@@ -13,7 +13,10 @@ patch(CashierName.prototype, {
|
||||
get avatar() {
|
||||
if (this.pos.config.module_pos_hr) {
|
||||
const cashier = this.pos.get_cashier();
|
||||
return `/web/image/hr.employee/${cashier.id}/avatar_128`;
|
||||
if (!(cashier && cashier.id)) {
|
||||
return "";
|
||||
}
|
||||
return `/web/image/hr.employee.public/${cashier.id}/avatar_128`;
|
||||
}
|
||||
return super.avatar;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user