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

Module: Resource booking

Entity: resource.booking

Compute Method: _compute_stop

Inputs Method Outputs
"""Get stop date from start date and duration."""
for record in self:
            try:
                record.stop = record.start + timedelta(hours=record.duration)
            except TypeError:
                # Either value is False: no stop date
                record.stop = False

Back to entity