Production schedule fails to update after BOM changes in production planning module

We updated several Bills of Materials yesterday to reflect new component specifications, but our production schedules aren’t recalculating. Manufacturing orders created before the BOM changes still reference old component lists, and new MOs created today are also using outdated BOMs. The shop floor is working from incorrect material lists causing delays. I’ve verified the BOMs are correctly updated in the master data (Manufacturing > Products > Bill of Materials), and they show the right components with correct quantities. But when I look at the manufacturing orders, they still show old components. Error in the logs:


ValueError: Manufacturing Order MO/00847 references archived BOM components
  at odoo.addons.mrp.models.mrp_production line 234
  in _generate_consumption_lines()
Component Part: COMP-OLD-123 (archived)
Expected: COMP-NEW-456

We have 23 MOs scheduled for this week that need correct component lists. Is there a way to force schedule recalculation or do we need to cancel and recreate all manufacturing orders?

That was exactly the issue - I archived old components instead of just updating the BOM lines. Unarchived them, properly updated the BOMs by editing existing lines, then used Update Components on all draft MOs. For the 5 confirmed ones, unlocked and refreshed them. Shop floor is back on track with correct component lists. Lesson learned about BOM update procedures!

This is expected Odoo MRP behavior - it’s actually a feature, not a bug. When a manufacturing order is created, it takes a snapshot of the current BOM to maintain consistency. If BOMs could change under active MOs, you’d have chaos on the shop floor with materials changing mid-production. For your situation, you have a few options: 1) For MOs in ‘Draft’ status, you can click the ‘Update Components’ button which will refresh from the current BOM. 2) For confirmed MOs, you’ll need to set them back to Draft first, then update components, then re-confirm. 3) For MOs already in progress, you may need to manually adjust the component lines. The error you’re seeing about archived components suggests you didn’t just update the BOM but actually archived old components and created new ones, which breaks the reference chain. Better approach is to update existing component records rather than replacing them.

Your issue has two parts: the BOM update methodology and the MO refresh process. Let me address both:

Part 1: BOM Update Problem The error shows you archived old components and added new ones, breaking references. Odoo BOMs work with product IDs, not product codes. When you archive COMP-OLD-123 and create COMP-NEW-456, existing MO lines still reference the archived product ID. Fix this:

# If you need to run a data fix script
self.env.cr.execute("""
    UPDATE mrp_bom_line
    SET product_id = %s
    WHERE product_id = %s
    AND bom_id IN (SELECT id FROM mrp_bom WHERE product_tmpl_id = %s)
""", (new_component_id, old_component_id, product_template_id))

Part 2: Refresh Existing MOs For the 23 MOs you have scheduled:

  1. Draft MOs: Go to Manufacturing > Operations > Manufacturing Orders, filter Status = ‘Draft’, select all, Actions > Update Components. This refreshes from current BOM.

  2. Confirmed MOs: These are trickier. You need to:

    • Set back to Draft (Unlock button)
    • Update Components
    • Re-confirm
  3. In Progress MOs: Manually edit the ‘Components’ tab, remove old component lines, add new ones.

Prevention Going Forward:

  • Never archive components that are referenced in BOMs
  • Instead of deleting BOM lines, edit the product_id field directly
  • Use BOM versions (create new BOM version, set old one inactive) for major changes
  • Test BOM changes in a draft MO before rolling out to production

The ‘Flexible BOM’ setting mentioned earlier doesn’t solve this - it just allows manual component adjustments during production. Your root issue is the data model break from archiving referenced products. Unarchive COMP-OLD-123, update all BOMs to properly reference COMP-NEW-456 by editing (not deleting) the BOM lines, then use the Update Components action on draft MOs.

We had similar issues during a component consolidation project. You need to handle this systematically to avoid shop floor disruption.