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: product.product

Compute Method: _compute_bom_count

Inputs Method Outputs
  • product_tmpl_id
  • product_tmpl_id.ids
for product in self:
            product.bom_count = self.env['mrp.bom'].search_count([
                '|', '|', ('byproduct_ids.product_id', 'in', product.ids), ('product_id', 'in', product.ids),
                '&', ('product_id', '=', False), ('product_tmpl_id', 'in', product.product_tmpl_id.ids),
            ])

Back to entity