d8cde5969f07fb2f12c46fd9844ea0519da0dcff
Since synchronization of tables was added in POS restaurant, requests are frequently made to the server to display the number of open orders on each table. The implementation of the counting caused O(num_tables) queries, and those queries were slow on large databases because there was no index for the `table_id` column. This patch fixes both problems, and the counting now uses 3 fast queries regardless of the number of tables. On a sample database with 2k tables and 50k POS orders, calls to `get_tables_order_count` went down from 1 s and 100+ SQL queries to 10 ms and 4 queries. About 2 orders of magnitude faster, with server load drastically reduced as well. closes odoo/odoo#44782 X-original-commit: 6c21ea369dc247b3ab31b767315c48ffc8d40a3d Signed-off-by: Olivier Dony (odo) <odo@openerp.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%