summaryrefslogtreecommitdiff
path: root/addons/website_links/static/src
diff options
context:
space:
mode:
authorryv-odoo <ryv@odoo.com>2019-10-10 13:24:27 +0000
committerryv-odoo <ryv@odoo.com>2019-10-10 15:19:43 +0000
commite0ba61d9fb6f15c9df5d9cec4b5a6b602dc45899 (patch)
tree2f7b4a59b80aab53de5f41b043daa5e58a3f324a /addons/website_links/static/src
parent8c2f6b006fd7e92653706652d5d5eb279887b0fd (diff)
[REM] website_links: remove favicon, icon_src for performance
The link tracker model (link.tracker) contained favicon (store) and icon_src computed fields. Computing favicon took {3-6.5%} of installing odoo (with demo data) due to syncronous http call to a external link (google). Moreover, these fields had no sense to be store in odoo and only used in one template. This template was modified to display the same information (icon) as before but without storing fields and with a lazy loading of icons. TASK_ID: 2083715 closes odoo/odoo#38405 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons/website_links/static/src')
-rw-r--r--addons/website_links/static/src/xml/recent_link.xml3
1 files changed, 1 insertions, 2 deletions
diff --git a/addons/website_links/static/src/xml/recent_link.xml b/addons/website_links/static/src/xml/recent_link.xml
index 22008b81203..dc41b9003fe 100644
--- a/addons/website_links/static/src/xml/recent_link.xml
+++ b/addons/website_links/static/src/xml/recent_link.xml
@@ -8,9 +8,8 @@
<p class="text-muted" style="margin-top: -5px;">clicks</p>
</div>
<div class="col-md-7 col-7">
-
<h4 class="truncate_text">
- <img t-att-src="widget.link_obj.icon_src" alt="Icon"/>
+ <img t-attf-src="http://www.google.com/s2/favicons?domain={{ widget.link_obj.url }}" loading="lazy" alt="Icon" onerror="this.src='/website_links/static/img/default_favicon.png'"/>
<a class="no-link-style" t-att-href="widget.link_obj.url"><t t-esc="widget.link_obj.title"/></a>
</h4>
<p class="text-muted mb0" style="margin-top: -5px;">