1b2ae7fceba08bd963465bb804a235596df7cfe2
Task Description In some case, when trying to display the context menu on a pivot cell (doesn't seem to impact PIVOT.HEADER), we get a traceback caused by the arguments of the formula take into account in the ´getFiltersMatchingPivot`, called by the "isVisible" property evaluation of the "set as filter" action. These errors only rise when using a pivot with "__count" as measure and a positional argument. Moreover, when trying to open the context menu with a filter defined without any field, we get another traceback. Reproducibility The first issue can be reproduced with the following steps: 1. Go to the CRM app 2. Create a pivot view 3. Group the row by Country 4. "Ungroup" the columns (keep only the total) 5. Set "__count" as measure 6. Insert the pivot on a new spreadsheet 7. Edit the pivot formulas to use positional argument for country_id 8. Insert a new filter on the country field 9. Right click on a pivot cell The second issue can be reproduced with the following steps: 1. Open a spreadsheet with a pivot 2. Add a filter related to the pivot but without any field matching 3. Right-click on a pivot cell Fix Description The first issue is coming from the fact we try to get the value related to a field in the pivot formula using the 2nd and 3rd argument instead of using the last two arguments of the formula. This is fixed by passing to getPivotHeaderValue only the last two arguments of the pivot formula. For the second issue, we simply check that the pivot field is defined before looking at its name. Related Task task-2999181 closes odoo/odoo#102204 X-original-commit: 15e0c8aba57d4e0a8c58f288a4e96f0bc884736c Related: odoo/enterprise#32303 Signed-off-by: Lucas Lefèvre (lul) <lul@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%