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_production_capacity
| Inputs | Method | Outputs |
|---|---|---|
|
for production in self:
production.production_capacity = production.product_qty
moves = production.move_raw_ids.filtered(lambda move: move.unit_factor and move.product_id.type != 'consu')
if moves:
- production_capacity = min(moves.mapped(lambda move: move.product_id.uom_id._compute_quantity(move.product_id.qty_available, move.product_uom) / move.unit_factor))
+ production_capacity = min(moves.mapped(lambda move: move.product_id.uom_id._compute_quantity(move.product_id.qty_available, move.uom_id) / move.unit_factor))
production.production_capacity = min(production.product_qty, production.product_id.uom_id.round(production_capacity))
|
|
