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.bom.line

Compute Method: _compute_child_bom_id

View 18.0
Inputs Method Outputs
  • product_id
- products = self.product_id
- bom_by_product = self.env['mrp.bom']._bom_find(products)
- for line in self:
-             if not line.product_id:
-                 line.child_bom_id = False
-             else:
-                 line.child_bom_id = bom_by_product.get(line.product_id, False)
  • child_bom_id

Back to entity