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

View 20.0
Inputs Method Outputs
  • module_pos_restaurant
  • floor_plan_settings
  • floor_ids
+ 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
+                 ],
+             }
  • floor_plan

Back to entity