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.warehouse.orderpoint

Compute Method: _compute_qty_to_order_computed

Inputs Method Outputs
def to_compute(orderpoint):
            # The check is on purpose. We only want to consider the horizon days if the forecast is negative and
            # there is already something to resupply base on lead times.
            return (
                orderpoint.id
                and orderpoint.uom_id.compare(orderpoint.qty_forecast, orderpoint.product_min_qty) < 0
            )
orderpoints = self.filtered(to_compute)
qty_in_progress_by_orderpoint = orderpoints._quantity_in_progress()
for orderpoint in orderpoints:
            orderpoint.qty_to_order_computed = orderpoint._get_qty_to_order(qty_in_progress_by_orderpoint=qty_in_progress_by_orderpoint)
(self - orderpoints).qty_to_order_computed = False

Back to entity