mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP] pms_api_rest: delete totalRooms in free-rooms service
This commit is contained in:
committed by
Darío Lodeiros
parent
f5eccc2add
commit
43a1481798
@@ -220,17 +220,11 @@ class PmsCalendarService(Component):
|
||||
)
|
||||
reservation_lines = self.env.cr.fetchall()
|
||||
|
||||
all_property_rooms = self.env["pms.room"].search(
|
||||
[
|
||||
("pms_property_id", "=", pms_calendar_search_param.pms_property_id),
|
||||
]
|
||||
)
|
||||
result = []
|
||||
for date, free_rooms in reservation_lines:
|
||||
daily_free_rooms = {
|
||||
"date": datetime.combine(date, datetime.min.time()).isoformat(),
|
||||
"freeRooms": free_rooms,
|
||||
"totalRooms": len(all_property_rooms),
|
||||
}
|
||||
result.append(daily_free_rooms)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user