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

Module: DDMRP

Entity: stock.buffer

Compute Method: _compute_dlt

Inputs Method Outputs
for rec in self:
            if rec.buffer_profile_id.item_type == "manufactured":
                bom = rec._get_manufactured_bom()
                dlt = bom.with_context(location_id=rec.location_id.id).dlt
            elif rec.buffer_profile_id.item_type == "distributed":
                dlt = rec.lead_days
            else:
                sellers = rec._get_product_sellers()
                dlt = sellers[0].delay if sellers else rec.lead_days
            rec.dlt = dlt

Back to entity