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: product.product
Compute Method: _compute_quantities
| Inputs | Method | Outputs |
|---|---|---|
|
- products = self.with_context(prefetch_fields=False).filtered(lambda p: p.type != 'service').with_context(prefetch_fields=True) - res = products._compute_quantities_dict(self.env.context.get('lot_id'), self.env.context.get('owner_id'), self.env.context.get('package_id'), self.env.context.get('from_date'), self.env.context.get('to_date')) - self.with_context(skip_qty_available_update=True).qty_available = 0.0 - self.incoming_qty = 0.0 - self.outgoing_qty = 0.0 - self.virtual_available = 0.0 - self.free_qty = 0.0 - for product in products: - product.with_context(skip_qty_available_update=True).update({key: val for key, val in res[product.id].items() if val}) |
|
