From a8b0cc451ce1138ac89ba2efa46ae8fe20157e4b Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Thu, 26 Dec 2019 17:32:13 +0000 Subject: [PATCH] [FIX] web_editor: update leftpanel widget visibility after value updates The visibility was sometimes updated too soon, while the values were not updated yet. Part of https://github.com/odoo/odoo/pull/42407 --- addons/web_editor/static/src/js/editor/snippets.options.js | 3 +-- 1 file changed, 1 insertion(+), 2 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 fca6783ca20..67b3e2a2f4d 100644 --- a/addons/web_editor/static/src/js/editor/snippets.options.js +++ b/addons/web_editor/static/src/js/editor/snippets.options.js @@ -1586,12 +1586,11 @@ const SnippetOptionWidget = Widget.extend({ // hold have been updated). return widget.updateUI(widget === forced); }); + await Promise.all(proms); if (!noVisibility) { await this.updateUIVisibility(); } - - return Promise.all(proms); }, /** * Updates the UI visibility - @see _computeVisibility. For widget update,