MRP BOM Overview

Solo Project by Matthias de Vries

📋 Description

An enhanced Bill of Materials overview interface that converts operation durations from minutes to hours for better readability. This JavaScript-based enhancement improves the BOM structure report with custom time formatting and specialized line components.

🎯 Business Challenge

Van Thiel's production planners found Odoo's default BOM overview difficult to read when dealing with long manufacturing operations:

  • Durations displayed in minutes (e.g., "180 minutes") instead of human-readable hours
  • BOM structure reports lacked visual hierarchy for complex nested BOMs
  • Difficulty quickly assessing total production time for quotes
  • Need for specialized display of subcontracted vs. internal operations

💡 Solution Approach

Matthias developed a frontend enhancement using Odoo's OWL framework:

  • Time Formatter Function: JavaScript utility converts minutes to hours:minutes format
  • Custom Line Components: Specialized components for BOM lines and special operation lines
  • Report Template Override: QWeb template customization for improved structure display
  • Backend Assets: Web assets bundled efficiently for fast loading

🔧 Technical Implementation

The module uses Odoo 17's new frontend architecture:

  • format_to_hours.js provides reusable time formatting logic
  • Custom OWL components: mrp_bom_overview_line and mrp_bom_overview_special_line
  • Assets injected via web.assets_backend bundle
  • QWeb report template in mrp_report_bom_structure.xml for print formatting
  • Depends on mrp_subcontracting for complete operation visibility

📊 Results & Impact

Production planners can now quickly scan BOM structures and understand time requirements at a glance. The human-readable hour format reduced calculation errors when preparing quotes. The enhanced visual hierarchy makes complex nested BOMs easier to navigate.