Metadata-Version: 2.1
Name: odoo-addon-mrp_production_check_bom_alignment
Version: 18.0.1.0.1.2
Requires-Python: >=3.10
Requires-Dist: odoo==18.0.*
Summary: Verify that a Manufacturing Order's components and workorder are consistent with its Bill of Materials.
Home-page: https://github.com/OCA/manufacture
License: LGPL-3
Author: ForgeFlow, Odoo Community Association (OCA)
Author-email: support@odoo-community.org
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 18.0
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
Description-Content-Type: text/x-rst

.. image:: https://odoo-community.org/readme-banner-image
   :target: https://odoo-community.org/get-involved?utm_source=readme
   :alt: Odoo Community Association

==================================
MRP Production Check BoM Alignment
==================================

.. 
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! This file is generated by oca-gen-addon-readme !!
   !! changes will be overwritten.                   !!
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! source digest: sha256:a914e3bb204aadba65ebbe5313087ecb969028c1af860b1ace10a5672cbc6bd2
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
    :target: https://odoo-community.org/page/development-status
    :alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png
    :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
    :alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github
    :target: https://github.com/OCA/manufacture/tree/18.0/mrp_production_check_bom_alignment
    :alt: OCA/manufacture
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
    :target: https://translation.odoo-community.org/projects/manufacture-18-0/manufacture-18-0-mrp_production_check_bom_alignment
    :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
    :target: https://runboat.odoo-community.org/builds?repo=OCA/manufacture&target_branch=18.0
    :alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

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.

**Table of contents**

.. contents::
   :local:

Usage
=====

The alignment check runs automatically — no manual configuration is
required.

**Warning banner**

Open any Manufacturing Order that is not yet done or cancelled. If the
MO's components, quantities, or consumed-in-operation assignments no
longer match the linked BoM (for example, because the BoM was updated
after the MO was confirmed), a yellow warning banner is displayed at the
top of the form explaining what is out of sync.

**Confirmation dialog**

When confirming a draft MO whose components or quantities are not
aligned with the BoM, a dialog is shown with three options:

- **Update MO and Confirm** — re-syncs the MO with the current BoM
  (equivalent to the standard *Update BoM* action) and then confirms it.
  Use this when the BoM change is intentional and the MO should reflect
  it.
- **Confirm Anyway** — confirms the MO as-is, ignoring the misalignment.
- **Go Back** — closes the dialog and returns to the MO so it can be
  reviewed or manually corrected before confirming.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/manufacture/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/manufacture/issues/new?body=module:%20mrp_production_check_bom_alignment%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* ForgeFlow

Contributors
------------

- Lois Rilo <lois.rilo@forgeflow.com>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
   :alt: Odoo Community Association
   :target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/manufacture <https://github.com/OCA/manufacture/tree/18.0/mrp_production_check_bom_alignment>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
