diff --git a/hotel_calendar/models/inherited_hotel_reservation.py b/hotel_calendar/models/inherited_hotel_reservation.py index b7d2c2e85..a40cbe4da 100644 --- a/hotel_calendar/models/inherited_hotel_reservation.py +++ b/hotel_calendar/models/inherited_hotel_reservation.py @@ -68,7 +68,7 @@ class HotelReservation(models.Model): 'id': room.id, 'name': room.name, 'capacity': room.capacity, - 'class_id': room.room_type_id.class_id.id, + 'class_name': room.room_type_id.class_id.name, 'shared': room.shared_room, 'price': room.room_type_id and ['pricelist', room.room_type_id.id, pricelist_id, diff --git a/hotel_calendar/static/src/js/views/calendar/hotel_calendar_controller.js b/hotel_calendar/static/src/js/views/calendar/hotel_calendar_controller.js index 4dd69b277..5917e1c59 100644 --- a/hotel_calendar/static/src/js/views/calendar/hotel_calendar_controller.js +++ b/hotel_calendar/static/src/js/views/calendar/hotel_calendar_controller.js @@ -113,7 +113,7 @@ var PMSCalendarController = AbstractController.extend({ r['id'], r['name'], r['capacity'], - r['class_id'], + r['class_name'], r['shared'], r['price'] ); @@ -122,7 +122,7 @@ var PMSCalendarController = AbstractController.extend({ 'room_type_id': r['room_type_id'], 'floor_id': r['floor_id'], 'amenities': r['amenity_ids'], - 'class_id': r['class_id'] + 'class_name': r['class_name'] }); rooms.push(nroom); } diff --git a/hotel_calendar/static/src/js/views/calendar/hotel_calendar_renderer.js b/hotel_calendar/static/src/js/views/calendar/hotel_calendar_renderer.js index b9b96b69b..248e5370d 100644 --- a/hotel_calendar/static/src/js/views/calendar/hotel_calendar_renderer.js +++ b/hotel_calendar/static/src/js/views/calendar/hotel_calendar_renderer.js @@ -772,7 +772,7 @@ var HotelCalendarView = AbstractRenderer.extend({ var virtual = _.map(this.$el.find('#pms-search #virtual_list').val(), function(item){ return +item; }); var domain = []; if (category && category.length > 0) { - domain.push(['class_id', 'in', category]); + domain.push(['class_name', 'in', category]); } if (floor && floor.length > 0) { domain.push(['floor_id', 'in', floor]);