[FIX] event: Remove broken google maps api link
Note: This is not fixed earlier because this in invalidates template translations and this isn't a major issue. Invalidating translations on 16.0 should still be fine as of writing this. Issue: Google recently added a requirement for an API key to their static maps API. This means we can no longer generate <img> tags linking to the google API without using a key. As we send that key inside emails, it cannot be protected by origin policies to prevent people from using the key outside of the domain of the database. Protecting it would require implementing signed google API requests, which cannot be done both quickly and sanely on stable. Fix: This commit replaces the image with a generic string to get rid of the 'missing image' icon. A better fix/imp may be introduced on the master branch at a later time. task - 3079113 closes odoo/odoo#109797 X-original-commit: a730c9920bc82a6637882f325ca3d947ca0ddd78 Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
This commit is contained in:
@@ -221,11 +221,12 @@
|
||||
|
||||
<tr><td valign="top" style="font-size: 14px;">
|
||||
<!-- GOOGLE MAPS LINK -->
|
||||
<t t-if="event_address">
|
||||
<t t-if="event_address and location">
|
||||
<table style="width:100%;"><tr><td>
|
||||
<div>
|
||||
<i class="fa fa-map-marker"/>
|
||||
<a t-attf-href="https://maps.google.com/maps?q={{ location }}" target="new">
|
||||
<img t-attf-src="http://maps.googleapis.com/maps/api/staticmap?autoscale=1&size=598x200&maptype=roadmap&format=png&visual_refresh=true&markers=size:mid%7Ccolor:0xa5117d%7Clabel:%7C{{ location }}" style="vertical-align:bottom; width: 100%;" alt="Google Maps"/>
|
||||
See location on Google Maps
|
||||
</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
@@ -445,8 +446,9 @@
|
||||
<!-- GOOGLE MAPS LINK -->
|
||||
<table t-if="event_address" style="width:100%;"><tr><td>
|
||||
<div>
|
||||
<i class="fa fa-map-marker"/>
|
||||
<a t-attf-href="https://maps.google.com/maps?q={{ location }}" target="new">
|
||||
<img t-attf-src="http://maps.googleapis.com/maps/api/staticmap?autoscale=1&size=598x200&maptype=roadmap&format=png&visual_refresh=true&markers=size:mid%7Ccolor:0xa5117d%7Clabel:%7C{{ location }}" style="vertical-align:bottom; width: 100%;" alt="Google Maps"/>
|
||||
See location on Google Maps
|
||||
</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
|
||||
@@ -476,10 +476,11 @@ msgid ""
|
||||
"\n"
|
||||
" <tr><td valign=\"top\" style=\"font-size: 14px;\">\n"
|
||||
" <!-- GOOGLE MAPS LINK -->\n"
|
||||
" <table t-if=\"event_address\" style=\"width:100%;\"><tr><td>\n"
|
||||
" <table t-if=\"event_address and location\" style=\"width:100%;\"><tr><td>\n"
|
||||
" <div>\n"
|
||||
" <i class=\"fa fa-map-marker\"/>\n"
|
||||
" <a t-attf-href=\"https://maps.google.com/maps?q={{ location }}\" target=\"new\">\n"
|
||||
" <img t-attf-src=\"http://maps.googleapis.com/maps/api/staticmap?autoscale=1&size=598x200&maptype=roadmap&format=png&visual_refresh=true&markers=size:mid%7Ccolor:0xa5117d%7Clabel:%7C{{ location }}\" style=\"vertical-align:bottom; width: 100%;\" alt=\"Google Maps\"/>\n"
|
||||
" See location on Google Maps\n"
|
||||
" </a>\n"
|
||||
" </div>\n"
|
||||
" </td></tr></table>\n"
|
||||
@@ -696,8 +697,9 @@ msgid ""
|
||||
" <t t-if=\"event_address\">\n"
|
||||
" <table style=\"width:100%;\"><tr><td>\n"
|
||||
" <div>\n"
|
||||
" <i class=\"fa fa-map-marker\"/>\n"
|
||||
" <a t-attf-href=\"https://maps.google.com/maps?q={{ location }}\" target=\"new\">\n"
|
||||
" <img t-attf-src=\"http://maps.googleapis.com/maps/api/staticmap?autoscale=1&size=598x200&maptype=roadmap&format=png&visual_refresh=true&markers=size:mid%7Ccolor:0xa5117d%7Clabel:%7C{{ location }}\" style=\"vertical-align:bottom; width: 100%;\" alt=\"Google Maps\"/>\n"
|
||||
" See location on Google Maps\n"
|
||||
" </a>\n"
|
||||
" </div>\n"
|
||||
" </td></tr></table>\n"
|
||||
|
||||
Reference in New Issue
Block a user