From cc4d57ff1459b14713a111c83cee9a2f14c7568f Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Tue, 29 Jan 2019 15:50:07 +0000 Subject: [PATCH] [FIX] website_event: restore country events option With https://github.com/odoo/odoo/commit/ac8b0fcfc5299b5ea62543b8382cb419fed4868e, the 'country_events' class was renamed to 'oe_country_events'. This was done correctly for JS animations and snippets but not for the 'Country Events' option in the customize menu. This made the option useless. This commit solves the problem by supporting the two classes (as it is a stable fix). closes odoo/odoo#30662 --- addons/website_event/static/src/js/website_geolocation.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/website_event/static/src/js/website_geolocation.js b/addons/website_event/static/src/js/website_geolocation.js index 43fb2209aef..040a436363c 100644 --- a/addons/website_event/static/src/js/website_geolocation.js +++ b/addons/website_event/static/src/js/website_geolocation.js @@ -4,11 +4,12 @@ odoo.define('website_event.geolocation', function (require) { var animation = require('web_editor.snippets.animation'); animation.registry.visitor = animation.Class.extend({ - selector: ".oe_country_events", + selector: ".oe_country_events, .country_events", start: function () { + var self = this; $.get("/event/get_country_event_list").then(function( data ) { if(data){ - $( ".country_events_list" ).replaceWith( data ); + self.$(".country_events_list").replaceWith( data ); } }); }