From 2385e58d76aa5e4bca0fc6d76ecedc7de5fd4267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Wed, 10 Feb 2021 13:49:26 +0000 Subject: [FIX] web, point_of_sale: update owl to v1.2.4 This commit update owl from 1.2.3 to 1.2.4, and introduces a few fixes for code that was broken (because it accesses private owl values) Note the fix for the test menu code is interesting. Before this commit, the handler for the click on the home menu component was not called, so the click had a side effect: it modified the url to its href, which caused the action manager to load the next application, even though the home menu was not mounted. With the update to Owl, this is no longer true: the handler is called, and call preventDefault on the event. Because of that, the url is not changed. However, since the home menu is itself not mounted, it cannot communicate to the web client that we should load the next app. This is why it was broken. The fix is simple: we actually make sure that the home menu is displayed before clicking on the app menuitem. closes odoo/odoo#65886 Signed-off-by: Aaron Bohy (aab) --- addons/web/static/src/js/component_extension.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'addons/web/static/src/js/component_extension.js') diff --git a/addons/web/static/src/js/component_extension.js b/addons/web/static/src/js/component_extension.js index ce9a3228569..4edaee807dd 100644 --- a/addons/web/static/src/js/component_extension.js +++ b/addons/web/static/src/js/component_extension.js @@ -13,12 +13,12 @@ return new Promise((resolve, reject) => { return this.env.services.rpc(...arguments) .then(result => { - if (!this.__owl__.isDestroyed) { + if (this.__owl__.status !== 5 /* not destroyed */) { resolve(result); } }) .catch(reason => { - if (!this.__owl__.isDestroyed) { + if (this.__owl__.status !== 5) /* not destroyed */ { reject(reason); } }); -- cgit v1.2.3