[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) <qsm@odoo.com>


Co-authored-by: qsm-odoo <qsm@odoo.com>
This commit is contained in:
dbh
2019-04-24 15:17:42 +00:00
committed by qsm-odoo
co-authored by qsm-odoo
parent b94395b501
commit 6af61e81a9
+3 -1
View File
@@ -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)$/);
})) {