From 36cd3ec68c97fab5cf4b34697399241944ea5094 Mon Sep 17 00:00:00 2001 From: "Victor Piryns (pivi)" Date: Wed, 15 Nov 2023 09:29:54 +0100 Subject: [PATCH] [PERF] project,*: download smaller avatars in portal view Description: Portal routes `/my/tickets` or `/my/tasks` were reported slow to load with many items. Analysis: The avatars that are loaded are of too large sizes (encoded in base64) compared to their rendering size. `img.o_avatar` limits the dimensions to `1.7145em` (roughly `27px` on desktop), so it's useless to load `avatar_1024` for those image sources. This has a significant impact when the user has a slow connection, the server is hosted far away from the user, or the images used are of badly compressed (so each images takes a quite a few MiB). Fix: Scan for all instances of the usage of `avatar_1024` on an `` with the class `o_avatar` and reduce it to `avatar_128`. Reference: opw-3470171 closes odoo/odoo#142103 Related: odoo/enterprise#50678 Signed-off-by: Xavier Bol (xbo) --- addons/account/views/account_portal_templates.xml | 2 +- addons/portal/views/portal_templates.xml | 2 +- addons/project/views/project_portal_project_task_templates.xml | 2 +- addons/purchase/views/portal_templates.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/account/views/account_portal_templates.xml b/addons/account/views/account_portal_templates.xml index 533fed71526..25c42521f8a 100644 --- a/addons/account/views/account_portal_templates.xml +++ b/addons/account/views/account_portal_templates.xml @@ -145,7 +145,7 @@