diff --git a/hotel_calendar/models/bus_hotel_calendar.py b/hotel_calendar/models/bus_hotel_calendar.py index 2cef55759..9314f95ed 100644 --- a/hotel_calendar/models/bus_hotel_calendar.py +++ b/hotel_calendar/models/bus_hotel_calendar.py @@ -110,7 +110,7 @@ class BusHotelCalendar(models.TransientModel): return { 'type': 'availability', 'availability': { - vals['room_id']: { + vals['room_type_id']: { date_dt.strftime("%d/%m/%Y"): [ vals['avail'], vals['no_ota'], diff --git a/hotel_calendar/models/inherited_hotel_room_type_availability.py b/hotel_calendar/models/inherited_hotel_room_type_availability.py index fa81bf137..4a001c4a9 100644 --- a/hotel_calendar/models/inherited_hotel_room_type_availability.py +++ b/hotel_calendar/models/inherited_hotel_room_type_availability.py @@ -8,7 +8,7 @@ class HotelRoomTypeAvailability(models.Model): @api.model def create(self, vals): - res = super(HotelVirtualRoomAvailability, self).create(vals) + res = super(HotelRoomTypeAvailability, self).create(vals) self.env['bus.hotel.calendar'].send_availability_notification({ 'date': res.date, 'avail': res.avail, @@ -20,7 +20,7 @@ class HotelRoomTypeAvailability(models.Model): @api.multi def write(self, vals): - ret_vals = super(HotelVirtualRoomAvailability, self).write(vals) + ret_vals = super(HotelRoomTypeAvailability, self).write(vals) bus_hotel_calendar_obj = self.env['bus.hotel.calendar'] for record in self: bus_hotel_calendar_obj.send_availability_notification({ @@ -44,7 +44,7 @@ class HotelRoomTypeAvailability(models.Model): 'no_ota': False, 'id': record.id, }) - res = super(HotelVirtualRoomAvailability, self).unlink() + res = super(HotelRoomTypeAvailability, self).unlink() bus_hotel_calendar_obj = self.env['bus.hotel.calendar'] for uval in unlink_vals: bus_hotel_calendar_obj.send_availability_notification(uval)