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: stock.picking

Compute Method: _compute_mrp_production_ids

Inputs Method Outputs
  • group_id
  • group_id.mrp_production_ids
  • move_ids
  • move_ids.move_dest_ids
  • move_ids.move_dest_ids.raw_material_production_id
  • production_ids
for picking in self:
            production_ids = picking.group_id.mrp_production_ids | picking.move_ids.move_dest_ids.raw_material_production_id
            # Filter out unwanted MO types
            picking.production_ids = production_ids.filtered(lambda p: p.picking_type_id.active)
            picking.production_count = len(picking.production_ids)

Back to entity