Files
odoo_source/addons
Victor Piryns (pivi) 34bd5d5655 [FIX] mail: abort ignored name_search RPC in "assign to" cmd palette
Issue:
When using the command palette to assign an user to a task, a
"spinning wheel" animation may show up even when everything seems to
have been loaded.

Steps to reproduce:
- Install Project
- For testing, add a `time.sleep(5)` in the
  `_name_search` of `'res.users'` to simulate a slow `name_search`
  (instead of populating).
- Open your browser's networking tab.
- Open a form view of a task, press Ctrl+K, Alt+I
- Start typing an user name
- Notice that all `name_search` requests are being processed, even
  if only the results of the last one are used. You may also notice
  the loading animation on the client.

Cause:
When using the cmd palette, when typing an user name, we are
sending RPC requests to the `name_search` of the `'res.users'` model.
The issue is that the requests are not aborted when it is
superseded by a new search value. This can lead to issues in a
large database where short search strings matches too many records,
therefor is generally slow. This can confuse the end user, as a
"spinning wheel" can show up, but the result are already present
(because a subsequent request gave back results faster than
the previous request, which is often the case because a more
elaborate search value matches less records, therefor is faster for
the DB to process). This use case also hogs workers uselessly for
results that are going to be ignored.

Fix:
Store the last running RPC and abort it when making a subsequent
call to it with new search values and the request hadn't complete.

Affected versions:
16.0 up to master = saas-17.1

Reference:
task-3532458

closes odoo/odoo#144900

X-original-commit: 2391d7ffc3dfe760c1ba75b7b2cbbedebff5f347
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2023-12-05 21:15:21 +00:00
..
2023-10-27 08:36:16 +00:00
2023-10-27 08:36:16 +00:00
2023-10-27 08:36:16 +00:00
2023-10-27 08:36:16 +00:00
2023-10-27 08:36:16 +00:00
2023-11-08 13:34:06 +00:00
2023-11-13 07:26:00 +00:00
2023-11-08 13:34:06 +00:00
2023-11-08 13:34:06 +00:00
2023-10-27 08:36:16 +00:00
2023-10-27 08:36:16 +00:00
2023-10-27 08:36:16 +00:00
2023-10-27 08:36:16 +00:00
2023-10-27 08:36:16 +00:00
2023-11-27 21:39:18 +00:00
2023-10-27 08:36:16 +00:00
2023-10-27 08:36:16 +00:00
2023-10-27 08:36:16 +00:00
2023-10-27 08:36:16 +00:00
2023-10-27 08:36:16 +00:00
2023-11-02 21:02:44 +00:00
2023-10-27 08:36:16 +00:00
2023-10-27 08:36:16 +00:00