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_yellow_zone

Inputs Method Outputs
for rec in self:
            if rec.product_id and rec.replenish_method == "min_max":
                rec.yellow_zone_qty = 0
            elif rec.product_id and rec.replenish_method == "replenish":
                dlt = rec.dlt + rec.extra_lead_time
                rec.yellow_zone_qty = float_round(
                    dlt * rec.adu, precision_rounding=rec.product_uom.rounding
                )
            elif rec.product_id and rec.replenish_method == "replenish_override":
                rec.yellow_zone_qty = rec.yellow_override
            else:
                rec.yellow_zone_qty = 0.0
            rec.top_of_yellow = rec.yellow_zone_qty + rec.red_zone_qty

Back to entity