From fbdec5fe29827b88ec0d1421f68716e1febefd89 Mon Sep 17 00:00:00 2001 From: Xavier Dubuc Date: Wed, 10 Mar 2021 16:45:49 +0000 Subject: [FIX] mail; hr: restore faster and more accurate mention suggestions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The code from v13 used to look for partners in JS before making the RPC, which was much faster, and also gave better results by returning partners that were already known and therefore more likely to be selected. The same logic is reintroduced here, and further improved to take into account all known partners and sort them according to the likeliness they will be selected based on various criteria. task-2413776 closes odoo/odoo#64161 Signed-off-by: Alexandre Kühn (aku) Co-authored-by: Sébastien Theys --- addons/mail/static/src/bugfix/bugfix.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/mail/static/src/bugfix/bugfix.js') diff --git a/addons/mail/static/src/bugfix/bugfix.js b/addons/mail/static/src/bugfix/bugfix.js index 4a8bb890bff..20800dc7046 100644 --- a/addons/mail/static/src/bugfix/bugfix.js +++ b/addons/mail/static/src/bugfix/bugfix.js @@ -61,7 +61,7 @@ function executeNextInQueue() { return; } const { component, func } = executionQueue.shift(); - if (!component.__owl__.isDestroyed) { + if (component.__owl__.status !== 5 /* DESTROYED */) { func(); } executeNextInQueue(); -- cgit v1.2.3