diff --git a/addons/mrp/report/mrp_report_bom_structure.py b/addons/mrp/report/mrp_report_bom_structure.py index fb5e0f05aad..615c8f50d94 100644 --- a/addons/mrp/report/mrp_report_bom_structure.py +++ b/addons/mrp/report/mrp_report_bom_structure.py @@ -380,7 +380,7 @@ 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': product.uom_id._compute_quantity(product.free_qty, 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 False, 'on_hand_qty': product.uom_id._compute_quantity(product.qty_available, bom_uom) if product.detailed_type == 'product' else False, 'stock_loc': 'in_stock', } diff --git a/addons/mrp/static/src/components/bom_overview/mrp_bom_overview.js b/addons/mrp/static/src/components/bom_overview/mrp_bom_overview.js index fd534f8d12a..87e0c3b024f 100644 --- a/addons/mrp/static/src/components/bom_overview/mrp_bom_overview.js +++ b/addons/mrp/static/src/components/bom_overview/mrp_bom_overview.js @@ -21,7 +21,7 @@ export class BomOverviewComponent extends Component { this.state = useState({ showOptions: { uom: false, - availabilities: false || this.props.action.context.activate_availabilities, + availabilities: false || Boolean(this.props.action.context.activate_availabilities), costs: true, operations: true, leadTimes: true,