BOM Attribute Match

mrp_bom_attribute_match
REPOSITORY
REPOSITORYOCA/manufacture
GIT
GIThttps://github.com/OCA/manufacture.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/manufacture/tree/18.0/mrp_bom_attribute_match
VERSION
VERSION 1.1.0
CATEGORY
CATEGORYManufacturing
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Ilyas, Ooops
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Ilyas, Ooops
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, arantxa-s73, eugenio, Vang - Nguyen
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 addresses the BoM case where the product to manufacture has
one attribute with tens or hundreds of values (usually attribute
"color", eg: "Configurable Desk" can be produced in 900 different
colors).

Creating a dynamic BoM currently requires adding one BoM line for each
attribute value to match component variant with attribute value (eg:
component "Desk board (Green)" to be applied to variant "Green").

This has 3 downsides:

- BoM lines proliferation (more error prone)
- Difficult to update in case a new attribute value (new color paint) is
  added
- Difficult to update in case base component changes.

This module allows to use a product template as component in BoM lines,
automatically matching component variant to use in MO line with the
attribute value selected for manufacture.

Eg: Product template "Desk Board" is added to BoM line for product
"Configurable Desk"; match is made on attribute "Color". In MO, if
product to manufacture is "Configurable Desk (Steel, Pink)", MO line
will have component "Desk Board (Pink)".

Using the same BoM, if product to manufacture is "Configurable Desk
(Steel, Yellow)", MO line will have component "Desk Board (Yellow)".

The flow is valid also if the Component (Product Template) has more than
one attribute matching the product to manufacture; in this case, on MO
line the component variant will be the one matching multiple attribute
values for the product to manufacture.

Various checks are in place to make sure this flow is not disrupted:

- user cannot add a product in field "Component (Product Template)"
  which:

  > does not have matching attributes with product to manufacture
  >
  > has a different variant-generating attribute than the product to
  > manufacture

- Adding a new variant-generating attribute to a product used as
  "Component (Product Template)" raises an error if the attribute is not
  included in all the products to manufacture where component is
  referenced.

- Removing an attribute used for BoM attribute matching from product to
  manufacture raises an error.

- On a BoM line with Component (Product Template) set, an attribute
  value of attributes referenced in "Match on attribute" field cannot be
  used in field "Apply to variant".

- If attribute value for matching attribute in manufactured product is
  not present in component (product template), the BoM line is skipped
  in MO.

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
mrp_bom_form_view mrp.bom field Inherits mrp.mrp_bom_form_view
Models touched (6)

New fields (0)

No new fields.

Public methods (1)
  • explode(self, product, quantity, picking_type=False, never_attribute_values=False)
    Explodes the BoM and creates two lists with all the information you need: bom_done and line_done Quantity describes the number of times you need the BoM: so the quantity divided by the number created by the BoM and converted into its UoM

New fields (5)
  • component_template_id Many2one → product.template
    args: 'product.template', 'Component (product template)'
  • match_on_attribute_ids Many2many → product.attribute
    compute='_compute_match_on_attribute_ids' store=True string='Match on Attributes' args: 'product.attribute'
  • product_backup_id Many2one → product.product
    help='Technical field to store previous value of product_id' args: 'product.product'
  • product_id Many2one → product.product
    required=False args: 'product.product', 'Component'
  • product_uom_category_id Many2one → uom.category
    compute='_compute_product_uom_category_id' compute_sudo=True related=None args: 'uom.category'
Public methods (1)
  • create(self, vals_list)
    @api.model_create_multi

New fields (0)

No new fields.

Public methods (1)
  • action_confirm(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/manufacture
GIT
GIThttps://github.com/OCA/manufacture.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/manufacture/tree/17.0/mrp_bom_attribute_match
VERSION
VERSION 1.0.1
CATEGORY
CATEGORYManufacturing
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Ilyas, Ooops
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Ilyas, Ooops
COMMITTERS
COMMITTERSOCA-git-bot, oca-ci, ferran-S73, eugenio
WEBSITE
WEBSITEhttps://github.com/OCA/manufacture
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:07
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mrp
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - 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 addresses the BoM case where the product to manufacture has
one attribute with tens or hundreds of values (usually attribute
"color", eg: "Configurable Desk" can be produced in 900 different
colors).

Creating a dynamic BoM currently requires adding one BoM line for each
attribute value to match component variant with attribute value (eg:
component "Desk board (Green)" to be applied to variant "Green").

This has 3 downsides:

- BoM lines proliferation (more error prone)
- Difficult to update in case a new attribute value (new color paint) is
  added
- Difficult to update in case base component changes.

This module allows to use a product template as component in BoM lines,
automatically matching component variant to use in MO line with the
attribute value selected for manufacture.

Eg: Product template "Desk Board" is added to BoM line for product
"Configurable Desk"; match is made on attribute "Color". In MO, if
product to manufacture is "Configurable Desk (Steel, Pink)", MO line
will have component "Desk Board (Pink)".

Using the same BoM, if product to manufacture is "Configurable Desk
(Steel, Yellow)", MO line will have component "Desk Board (Yellow)".

The flow is valid also if the Component (Product Template) has more than
one attribute matching the product to manufacture; in this case, on MO
line the component variant will be the one matching multiple attribute
values for the product to manufacture.

Various checks are in place to make sure this flow is not disrupted:

- user cannot add a product in field "Component (Product Template)"
  which:

  > does not have matching attributes with product to manufacture
  >
  > has a different variant-generating attribute than the product to
  > manufacture

- Adding a new variant-generating attribute to a product used as
  "Component (Product Template)" raises an error if the attribute is not
  included in all the products to manufacture where component is
  referenced.

- Removing an attribute used for BoM attribute matching from product to
  manufacture raises an error.

- On a BoM line with Component (Product Template) set, an attribute
  value of attributes referenced in "Match on attribute" field cannot be
  used in field "Apply to variant".

- If attribute value for matching attribute in manufactured product is
  not present in component (product template), the BoM line is skipped
  in MO.

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
mrp_bom_form_view mrp.bom field Inherits mrp.mrp_bom_form_view
Models touched (5)

New fields (0)

No new fields.

Public methods (1)
  • explode(self, product, quantity, picking_type=False)
    Explodes the BoM and creates two lists with all the information you need: bom_done and line_done Quantity describes the number of times you need the BoM: so the quantity divided by the number created by the BoM and converted into its UoM

New fields (5)
  • component_template_id Many2one → product.template
    args: 'product.template', 'Component (product template)'
  • match_on_attribute_ids Many2many → product.attribute
    compute='_compute_match_on_attribute_ids' store=True string='Match on Attributes' args: 'product.attribute'
  • product_backup_id Many2one → product.product
    help='Technical field to store previous value of product_id' args: 'product.product'
  • product_id Many2one → product.product
    required=False args: 'product.product', 'Component'
  • product_uom_category_id Many2one → uom.category
    compute='_compute_product_uom_category_id' compute_sudo=True related=None args: 'uom.category'
Public methods (1)
  • create(self, vals_list)
    @api.model_create_multi

New fields (0)

No new fields.

Public methods (1)
  • action_confirm(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/manufacture
GIT
GIThttps://github.com/OCA/manufacture.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/manufacture/tree/15.0/mrp_bom_attribute_match
VERSION
VERSION 1.1.1
CATEGORY
CATEGORYManufacturing
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Ilyas, Ooops
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Ilyas, Ooops
COMMITTERS
COMMITTERSIvàn Todorovich, Weblate, OCA-git-bot, valen, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/manufacture
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:46:36
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mrp
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
    - stock
    - barcodes
    - digest
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
mrp_bom_form_view mrp.bom field Inherits mrp.mrp_bom_form_view
Models touched (5)

New fields (0)

No new fields.

Public methods (1)
  • explode(self, product, quantity, picking_type=False)
    Explodes the BoM and creates two lists with all the information you need: bom_done and line_done Quantity describes the number of times you need the BoM: so the quantity divided by the number created by the BoM and converted into its UoM

New fields (5)
  • component_template_id Many2one → product.template
    args: 'product.template', 'Component (product template)'
  • match_on_attribute_ids Many2many → product.attribute
    compute='_compute_match_on_attribute_ids' store=True string='Match on Attributes' args: 'product.attribute'
  • product_backup_id Many2one → product.product
    help='Technical field to store previous value of product_id' args: 'product.product'
  • product_id Many2one → product.product
    required=False args: 'product.product', 'Component'
  • product_uom_category_id Many2one → uom.category
    compute='_compute_product_uom_category_id' related=None args: 'uom.category'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • action_confirm(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/manufacture
GIT
GIThttps://github.com/OCA/manufacture.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/manufacture/tree/14.0/mrp_bom_attribute_match
VERSION
VERSION 1.2.6
CATEGORY
CATEGORYManufacturing
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Ilyas, Ooops
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Ilyas, Ooops
COMMITTERS
COMMITTERSAkim Juillerat, OCA Transbot, oca-travis, Weblate, OCA-git-bot, ferran-73, oca-ci, Alessandro Uffreduzzi, Ilyas, Alessio Renda, Kev-Roche, Ioan
WEBSITE
WEBSITEhttps://github.com/OCA/manufacture
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:41:03
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mrp
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
    - stock
    - barcodes
    - digest
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (2)
XML IDNameModelTypeStatus
mrp_bom_line_view_form_inherit mrp.bom.line field Inherits mrp.mrp_bom_line_view_form
mrp_bom_view_form_inherit_bom_match mrp.bom field Inherits mrp.mrp_bom_form_view
Models touched (5)

New fields (0)

No new fields.

Public methods (1)
  • explode(self, product, quantity, picking_type=False)
    Explodes the BoM and creates two lists with all the information you need: bom_done and line_done Quantity describes the number of times you need the BoM: so the quantity divided by the number created by the BoM and converted into its UoM

New fields (5)
  • component_template_id Many2one → product.template
    domain="[('id', '!=', parent_product_tmpl_id)]" args: 'product.template', 'Component (product template)'
  • match_on_attribute_ids Many2many → product.attribute
    compute='_compute_match_on_attribute_ids' store=True string='Match on Attributes' args: 'product.attribute'
  • product_backup_id Many2one → product.product
    help='Technical field to store previous value of product_id' args: 'product.product'
  • product_id Many2one → product.product
    required=False args: 'product.product', 'Component'
  • product_uom_category_id Many2one → uom.category
    compute='_compute_product_uom_category_id' related=None args: 'uom.category'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • action_confirm(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

STATUS
STATUSOpen migration PR - not merged yet for this version
REPOSITORY
REPOSITORYOCA/manufacture
PULL REQUEST
PULL REQUEST[19.0][MIG] mrp_bom_attribute_match: Migration to 19.0. (#1632)