da6bf603ee5b19d1614a894ed1fc4154f8ca874c
Steps to reproduce: 1. Install Dashboard & Inventory (enable multi-locations) 2. Make inventory adjustments to have a location with negative stock 3. Go to the dashboard app & click on “Inventory On Hands”. 4. An error shows up: TypeError: chart.dataSource.getData() is null Issue: If one of the locations have negative stock, the pie chart will not be displayed and it will throw many errors, It has the same behavior If every location have negative stock. Solution: Discussed with the PO, when we have positive and negative values, we want to ignore the negative values and display the pie chart with the positive values only. For this case, we modified `_prepareData` and `_isValidData` methods so they check and filter the positive values in case we have any. For the other case when we don't have any data, that can be displayed in the pie chart, we added a way to don't get any error and only display a blank pie chart. opw-3103967 closes odoo/odoo#113794 X-original-commit: 3fdfc357097fc77cb998e8a6794efe1f9ffa53bb Signed-off-by: Mathieu Duckerts-Antoine <dam@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%