6e45c0fd2273ffce73013c6a409a5fb77799a32b
Steps to reproduce: - Insert a list view in a spreadsheet - Cut & Paste the entire list to a new sheet - On the first sheet, insert a formula, `=SUM()` which sum many records of the list - Click on `Clear history` in the file menu (to force a snapshot and a reload) => There are one RPC by number of records in the SUM function, with the limit increased by 1 each time. The record limit (the bigger record index) is computed during the evaluation. With a normal case, the evaluation goes through all the cells of the viewport, collect the biggest record index, and trigger the rpc after that. However, in our usecase, the evaluation is not passed on the second sheet (the one which contains the list view), so the limit is not computed. When we evaluate the arguments of the `SUM` function, we evaluate each argument one by one. So we evaluate a `ODOO.LIST` formula, the limit is lower than the previous limit, so the function returns an error. But when evaluating the arguments of a function, we stop the evaluation as soon as we find an error. So the evaluation of the `SUM` function is stopped, and the limit is not entirely computed. So the first RPC will have a limit 1, then the evaluation is re-run, a second RPC is triggered with a limit 2, and so on. This commit fixes the issue by preloading the limit during the import of the data and during an UPDATE_CELL. opw-3165458 closes odoo/odoo#113789 X-original-commit: 1c5a05198542b3a40c97443b2a9ecf5fb32eb5f2 Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com> Signed-off-by: Pierre Rousseau (pro) <pro@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%