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

View 19.0
Inputs Method Outputs
+ def to_compute(orderpoint):
+             rounding = orderpoint.product_uom.rounding
+             # 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 float_compare(orderpoint.qty_forecast, orderpoint.product_min_qty, precision_rounding=rounding) < 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
  • qty_to_order_computed

Back to entity