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

Module: Project Task Stock

Entity: project.task

Compute Method: _compute_unreserve_visible

Inputs Method Outputs
for item in self:
            already_reserved = item.mapped("move_ids.move_line_ids")
            any_quantity_done = any(
                [
                    m.quantity > 0
                    for m in item.move_ids.filtered(lambda x: x.state == "done")
                ]
            )
            item.unreserve_visible = not any_quantity_done and already_reserved

Back to entity