Skip to content
Snippets Groups Projects
Commit ae8403d0 authored by Ivan Yelizariev's avatar Ivan Yelizariev
Browse files

[FIX] website_event: fix flag url in dynamic snippet

Since Odoo 14.0 flag image is not a binary field anymore [1] and field name is
changed to `image_url`.
So, fix it by using the url directly.

STEPS:
* Flag image is used when user country_code is provided and there are events for
that country. The user country_code is computed by IP. If you run Odoo locally
you can temporarly update `get_country_events` to force some country code
* In a website page add a header-title block first, then add the dynamic snippet
"Events"

BEFORE: dummy image "no photo yet"
AFTER: flag image

---

[1] https://github.com/odoo/odoo/commit/710705b64c0134a5b568d998d0a3eb0df0f541c0


opw-2625695

closes odoo/odoo#75319

Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
parent 47894929
Branches
Tags
No related merge requests found
......@@ -25,7 +25,7 @@
<h6 class="o_wevent_sidebar_title">
<t t-if="country">
<i class="fa fa-flag mr-2"/>Events: <span t-esc="country.name"/>
<img class="img-fluid" t-att-src="website.image_url(country, 'image')" alt=""/>
<img class="img-fluid" t-att-src="country.image_url" alt=""/>
</t>
<t t-else="">
<i class="fa fa-globe mr-2"/>Upcoming Events
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment