From 037bc4c255fcf17416737b0c3eb2476b51a82df9 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Thu, 16 Dec 2021 17:06:37 +0000 Subject: [PATCH] [FIX] web_editor: remove useless test-breaking warning A console.warn instruction was added with [1] in case an user interacts with an editor widget which does not declare any linked option method (as it is most probably a dev mistake). We have cases where it makes sense though, adding a custom button with more complex events and interactions or simply in some strange custo. This warning prevents to test those uncommon behaviors in a tour test (which is what following commits of this PR are trying to do). This commit simply removes the warning. [1]: https://github.com/odoo/odoo/commit/be05ac7e2b8d866a72693b761f3bc8576d54e59e#diff-ffb61e86e6b8297ef8997f9c605de14de896b54161c032d88a80bbaeac4f89beR490 X-original-commit: 1b18747c7a328df142d7b2cf206a84c39d5eac05 Part-of: odoo/odoo#81557 --- addons/web_editor/static/src/js/editor/snippets.options.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/addons/web_editor/static/src/js/editor/snippets.options.js b/addons/web_editor/static/src/js/editor/snippets.options.js index 254cec8963a..e86e2277ece 100644 --- a/addons/web_editor/static/src/js/editor/snippets.options.js +++ b/addons/web_editor/static/src/js/editor/snippets.options.js @@ -508,12 +508,6 @@ const UserValueWidget = Widget.extend({ * @param {boolean} [isSimulatedEvent=false] */ notifyValueChange: function (previewMode, isSimulatedEvent) { - // If the widget has no associated method, it should not notify user - // value changes - if (!this._methodsNames.length) { - console.warn('UserValueWidget with no methods notifying value change'); - } - // In the case we notify a change update, force a preview update if it // was not already previewed const isPreviewed = this.isPreviewed();