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_lead_days

Inputs Method Outputs
orderpoints_to_compute = self.filtered(lambda orderpoint: orderpoint.product_id and orderpoint.location_id)
for orderpoint in orderpoints_to_compute:
            values = orderpoint._get_lead_days_values()
            lead_days, _ = orderpoint.rule_ids._get_lead_days(orderpoint.product_id, bypass_delay_description=True, **values)
            orderpoint.lead_horizon_date = fields.Date.today() + relativedelta(days=lead_days['total_delay'] + lead_days['horizon_time'])
            orderpoint.lead_days = lead_days['total_delay']
(self - orderpoints_to_compute).lead_horizon_date = False
(self - orderpoints_to_compute).lead_days = 0

Back to entity