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

Module: Project timeline

Entity: project.task

Compute Method: _compute_planned_date_end

Inputs Method Outputs
"""Put the done date as the planned end if not other value is previously set,
        avoiding to trigger the constraint.
        """
for record in self.filtered(lambda x: not x.planned_date_end and x.date_end):
            if (
                not record.planned_date_start
                or record.planned_date_start <= record.date_end
            ):
                record.planned_date_end = record.date_end

Back to entity