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

Module: Inventory

Entity: stock.quant

Compute Method: _compute_inventory_date

Inputs Method Outputs
quants = self.filtered(lambda q: not q.inventory_date and q.location_id.usage in ['internal', 'transit'])
date_by_location = {loc: loc._get_next_inventory_date() for loc in quants.location_id}
for quant in quants:
            quant.inventory_date = date_by_location[quant.location_id]

Back to entity