Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Manufacturing

Entity: mrp.production

Compute Method: _compute_product_id

View 17.0 View 19.0
Inputs Method Outputs
  • bom_id
  • product_id
  • product_tmpl_id
  • product_id.product_tmpl_id
for production in self:
            bom = production.bom_id
            if bom and (
-                 not production.product_id or bom.product_tmpl_id != production.product_tmpl_id
+                 not production.product_id or bom.product_tmpl_id != production.product_id.product_tmpl_id
                or bom.product_id and bom.product_id != production.product_id
            ):
                production.product_id = bom.product_id or bom.product_tmpl_id.product_variant_id
  • product_id

Back to entity