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

Module: MRP - BoM version

Entity: mrp.bom

Compute Method: _compute_old_versions

View 18.0
Inputs Method Outputs
  • previous_bom_id
- for bom in self:
-             previous = bom.previous_bom_id
-             old_version = self.env["mrp.bom"]
-             while previous:
-                 old_version |= previous
-                 previous = previous.previous_bom_id
-             bom.old_versions = [(6, 0, old_version.ids)]
  • old_versions

Back to entity