From 6af61e81a914bc48b3ff66c14ed5dfee533f23f7 Mon Sep 17 00:00:00 2001 From: dbh Date: Wed, 24 Apr 2019 15:06:17 +0000 Subject: [PATCH] [IMP] web_tour: review consume event for m2x widgets Tour steps on m2x widgets are now consumed only when an actual record is selected (not on random click on the widget). closes odoo/odoo#21625 Signed-off-by: Quentin Smetz (qsm) Co-authored-by: qsm-odoo --- addons/web_tour/static/src/js/tip.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/web_tour/static/src/js/tip.js b/addons/web_tour/static/src/js/tip.js index 38e67a8b48c..021098f7ede 100644 --- a/addons/web_tour/static/src/js/tip.js +++ b/addons/web_tour/static/src/js/tip.js @@ -297,7 +297,9 @@ var Tip = Widget.extend({ }); Tip.getConsumeEventType = function ($element) { - if ($element.is("textarea") || $element.filter("input").is(function () { + if ($element.hasClass('o_field_many2one') || $element.hasClass('o_field_many2manytags')) { + return 'autocompleteselect'; + } else if ($element.is("textarea") || $element.filter("input").is(function () { var type = $(this).attr("type"); return !type || !!type.match(/^(email|number|password|search|tel|text|url)$/); })) {