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

Module: Restaurant

Entity: pos.config

Compute Method: _compute_floor_plan

Inputs Method Outputs
for record in self:
            if not record.module_pos_restaurant:
                record.floor_plan = None
                continue
            record.floor_plan = {
                'settings': record.floor_plan_settings or {},
                'floors': [
                    {
                        'id': floor.id,
                        **(floor.floor_plan_layout or {}),
                        'tables': [
                            {'id': table.id, **(table.floor_plan_layout or {})}
                            for table in floor.table_ids if table.active
                        ]
                    }
                    for floor in record.floor_ids if floor.active
                ],
            }

Back to entity