34bd5d56559e09358d017decfdbfa29dbfe868ec
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>
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%