MRP Production Check BoM Alignment

mrp_production_check_bom_alignment
REPOSITORY
REPOSITORYOCA/manufacture
GIT
GIThttps://github.com/OCA/manufacture.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/manufacture/tree/18.0/mrp_production_check_bom_alignment
VERSION
VERSION 1.0.1
CATEGORY
CATEGORYManufacturing
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ForgeFlow
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ForgeFlow
COMMITTERS
COMMITTERSLois Rilo, Weblate, OCA-git-bot, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/manufacture
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:14
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mrp
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
    - uom
    - stock
    - barcodes_gs1_nomenclature
    - barcodes
    - digest
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
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 xpath Inherits mrp.mrp_production_form_view
view_mrp_bom_alignment_warning_form mrp.bom.alignment.warning.form mrp.bom.alignment.warning form New
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)