From 3ecea2c934063f93e3d9bcabc020ff090abf69b0 Mon Sep 17 00:00:00 2001 From: "Michael Mattiello (mcm)" Date: Fri, 21 Feb 2020 09:15:40 +0000 Subject: [PATCH] [FIX] web_tour: listen on date range picker event When applying the selected date range using the widget the tip wasn't consumed. This commit fixes it by listening on the event triggered when clicking on button apply. closes odoo/odoo#45916 X-original-commit: 150d69f70a505efa298c66119eced29d8caa3699 Signed-off-by: Aaron Bohy (aab) --- addons/web_tour/static/src/js/tip.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/web_tour/static/src/js/tip.js b/addons/web_tour/static/src/js/tip.js index e299df9b538..0247545242e 100644 --- a/addons/web_tour/static/src/js/tip.js +++ b/addons/web_tour/static/src/js/tip.js @@ -312,6 +312,10 @@ Tip.getConsumeEventType = function ($element) { var type = $(this).attr("type"); return !type || !!type.match(/^(email|number|password|search|tel|text|url)$/); })) { + // FieldDateRange triggers a special event when using the widget + if ($element.hasClass("o_field_date_range")) { + return "apply.daterangepicker input"; + } return "input"; } else if ($element.hasClass('ui-draggable-handle')) { return "drag";