diff options
| author | Michael Mattiello (mcm) <mcm@odoo.com> | 2020-02-18 08:41:31 +0000 |
|---|---|---|
| committer | Michael Mattiello (mcm) <mcm@odoo.com> | 2020-02-18 08:56:41 +0000 |
| commit | 16c41832a3e174412873860c25ae2a8c8d8ae190 (patch) | |
| tree | 11e0e2a88c0df0a34d16a65dd770f8beb4f4b586 /addons/web/static/src/js | |
| parent | 2c383aae48b81597d3dae6318a3e8a8f56f6f6b8 (diff) | |
[IMP] web: owl_compatibility warn only if debug=assets
Before this commit ComponentAdapter warned on every update and render.
This can make a lot of noises when we use some adpaters.
After this commit ComponentAdapter will warn only in debug=assets mode.
closes odoo/odoo#45583
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/owl_compatibility.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/addons/web/static/src/js/owl_compatibility.js b/addons/web/static/src/js/owl_compatibility.js index abf07d9681d..9683cd4211d 100644 --- a/addons/web/static/src/js/owl_compatibility.js +++ b/addons/web/static/src/js/owl_compatibility.js @@ -203,7 +203,9 @@ odoo.define('web.OwlCompatibility', function () { * @returns {Promise} */ updateWidget(/*nextProps*/) { - console.warn(`ComponentAdapter: Widget could not be updated, maybe override 'updateWidget' function?`); + if (this.env.isDebug('assets')) { + console.warn(`ComponentAdapter: Widget could not be updated, maybe override 'updateWidget' function?`); + } } /** @@ -212,7 +214,9 @@ odoo.define('web.OwlCompatibility', function () { * updated at once. It must be synchronous */ renderWidget() { - console.warn(`ComponentAdapter: Widget could not be re-rendered, maybe override 'renderWidget' function?`); + if (this.env.isDebug('assets')) { + console.warn(`ComponentAdapter: Widget could not be re-rendered, maybe override 'renderWidget' function?`); + } } /** |
