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

Module: Stock batch picking extended

Entity: stock.picking.batch

Compute Method: _compute_picking_count

Inputs Method Outputs
"""Calculate number of pickings."""
counts = dict(
            self.env["stock.picking"]._read_group(
                [("batch_id", "in", self.ids)], ["batch_id"], ["__count"]
            )
        )
for batch in self:
            batch.picking_count = counts.get(batch, 0)

Back to entity