diff --git a/inventory_stock_dashboard_odoo/doc/RELEASE_NOTES.md b/inventory_stock_dashboard_odoo/doc/RELEASE_NOTES.md index 3f5e95b60..720120fa3 100644 --- a/inventory_stock_dashboard_odoo/doc/RELEASE_NOTES.md +++ b/inventory_stock_dashboard_odoo/doc/RELEASE_NOTES.md @@ -4,3 +4,10 @@ #### Version 17.0.1.0.0 ##### ADD - Initial commit for Inventory Dashboard Odoo 17 + +## Module + +#### 27.03.2024 +#### Version 17.0.1.0.1 +##### BUG FIX +- Added condition for checking the category of the product. diff --git a/inventory_stock_dashboard_odoo/models/stock_move_line.py b/inventory_stock_dashboard_odoo/models/stock_move_line.py index cad413926..ad8c4d363 100644 --- a/inventory_stock_dashboard_odoo/models/stock_move_line.py +++ b/inventory_stock_dashboard_odoo/models/stock_move_line.py @@ -62,6 +62,8 @@ class StockMoveLine(models.Model): @api.model def product_move_by_category(self, option): """ Returns category name and quantity_done.""" + if option is None: + return {} category_id = int(option) company_id = self.env.company.id query = ('''select product_template.name,sum(stock_move_line.quantity) from stock_move_line