[FIX]pms_api_rest: count free rooms property domain

This commit is contained in:
Darío Lodeiros
2022-10-26 13:18:06 +02:00
parent 8a85736d01
commit 387c91cb4c

View File

@@ -322,7 +322,12 @@ class PmsCalendarService(Component):
{
"room_type_id": room_type.id,
"rooms_total": len(
self.env["pms.room"].search([("room_type_id", "=", room_type.id)])
self.env["pms.room"].search(
[
("room_type_id", "=", room_type.id),
("pms_property_id", "=", pms_property_id),
]
)
),
}
for room_type in room_types