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_location

Inputs Method Outputs
"""Get location from meeting or type."""
for record in self:
            # Get location from type when changing it or creating from ORM
            # HACK https://github.com/odoo/odoo/issues/74152
            if not record.location or record._origin.type_id != record.type_id:
                record.location = record.type_id.location
            # Get it from meeting only when available
            elif record.meeting_id:
                record.location = record.meeting_id.location

Back to entity