From 0969c13237fbe3b077a2298dab6aaecb7d80ec58 Mon Sep 17 00:00:00 2001 From: micheledic Date: Thu, 7 Dec 2023 16:41:03 +0100 Subject: [PATCH] [FIX] stock: fix for TypeError: value.toFixed is not a function on BomOverviewTable caused by False value on quantity closes odoo/odoo#145449 Signed-off-by: Quentin Wolfs (quwo) --- addons/mrp/report/mrp_report_bom_structure.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/mrp/report/mrp_report_bom_structure.py b/addons/mrp/report/mrp_report_bom_structure.py index ab8eac0292a..019cdaa9e86 100644 --- a/addons/mrp/report/mrp_report_bom_structure.py +++ b/addons/mrp/report/mrp_report_bom_structure.py @@ -382,8 +382,8 @@ class ReportBomStructure(models.AbstractModel): @api.model def _get_quantities_info(self, product, bom_uom, product_info, parent_bom=False, parent_product=False): return { - 'free_qty': max(product.uom_id._compute_quantity(product.free_qty, bom_uom), 0) if product.detailed_type == 'product' else False, - 'on_hand_qty': product.uom_id._compute_quantity(product.qty_available, bom_uom) if product.detailed_type == 'product' else False, + 'free_qty': max(product.uom_id._compute_quantity(product.free_qty, bom_uom), 0) if product.detailed_type == 'product' else 0, + 'on_hand_qty': product.uom_id._compute_quantity(product.qty_available, bom_uom) if product.detailed_type == 'product' else 0, 'stock_loc': 'in_stock', }