[IMP] Rename check_availability_room->check_availability_room_type

This commit is contained in:
QS5ELkMu
2018-11-08 12:59:15 +01:00
committed by Dario Lodeiros
parent 7851f3b429
commit 7d8a5ddf1b
11 changed files with 71 additions and 17 deletions

View File

@@ -18,12 +18,12 @@ class HotelRoomType(models.Model):
Check availability for all or specific room types between dates
@return: A list of `ids` with free rooms
"""
free_rooms = super().check_availability_room(dfrom, dto, room_type_id, notthis)
free_rooms = super().check_availability_room_type(dfrom, dto, room_type_id, notthis)
return free_rooms.ids
@api.model
def get_room_type_availability(self, dfrom, dto, room_type_id):
free_rooms = self.check_availability_room(dfrom, dto)
free_rooms = self.check_availability_room_type(dfrom, dto)
availability_real = self.env['hotel.room'].search_count([
('id', 'in', free_rooms.ids),
('room_type_id', '=', room_type_id),