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

Module: Property Management System

Entity: pms.property

Compute Method: _compute_balcony

View 19.0
Inputs Method Outputs
  • room_ids
+ for rec in self:
+             type_id = self.env.ref(
+                 "pms_base.pms_room_type_balcony", raise_if_not_found=False
+             )
+             balcony = len(rec.room_ids.filtered(lambda x, _t=type_id: x.type_id == _t))
+             if balcony:
+                 rec.balcony = True
+             else:
+                 rec.balcony = False
  • balcony

Back to entity