Repository
OCA/manufacture · module folder · Try on Runboat
Module version
1.0.4
Category
Manufacturing
Folder size
0.07 MB
License
LGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/manufacture
Last tracking update
2026-08-07 08:42:53
Authors
Odoo Community Association (OCA), ForgeFlow
Maintainers
Odoo Community Association (OCA), ForgeFlow
Committers
Lois Rilo, Weblate, ThiagoMForgeFlow, OCA-git-bot, oca-ci, Joan Sisquella, Arnau
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None
Description
This module checks that a Manufacturing Order's components, by-products, and
operations are consistent with its current Bill of Materials.

Seven alignment checks are performed:

- **Components** — the set of BoM lines linked to the MO's raw moves matches
  the BoM exactly (no added or removed lines).
- **Operations** — the set of operations in the MO's work orders matches the
  BoM's operation list exactly.
- **Component quantities** — each raw move's demand quantity matches the
  BoM line quantity scaled to the MO production quantity.
- **Consumed in Operation** — each raw move's operation (recorded on the move
  when the MO was created) matches the current "Consumed in Operation" defined
  on its BoM line.
- **By-products** — the set of BoM by-products linked to the MO's finished
  moves matches the BoM exactly (no added or removed by-products).
- **By-product quantities** — each by-product move's demand quantity matches
  the BoM by-product quantity scaled to the MO production quantity.
- **Produced in Operation** — each by-product move's operation matches the
  current "Produced in Operation" defined on its BoM by-product.

When a misalignment is detected:

- A **warning banner** is shown at the top of the Manufacturing Order form
  for any MO that is not yet done or cancelled.
- When **confirming** a misaligned MO, a dialog is shown giving the user the
  choice to fix it, go back or confirm it anyway.

Code Analysis

Views touched (2)
XML IDNameModelTypeStatus
mrp_production_form_view_check_bom_alignment mrp.production.form.check.bom.alignment mrp.production form Inherits mrp.mrp_production_form_view
view_mrp_bom_alignment_warning_form mrp.bom.alignment.warning.form mrp.bom.alignment.warning form New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (2)

New fields (3)
  • mrp_production_count Integer
    compute='_compute_mrp_production_count'
  • mrp_production_ids Many2many → mrp.production
    args: 'mrp.production'
  • mrp_production_names Char
    compute='_compute_mrp_production_count'
Public methods (2)
  • action_confirm_anyway(self)
  • action_update_and_confirm(self)

New fields (1)
  • bom_alignment_warning Char
    compute='_compute_bom_alignment_warning'
Public methods (1)
  • action_confirm(self)