diff --git a/hotel/models/hotel_room_type_restriction.py b/hotel/models/hotel_room_type_restriction.py index 64a7030ab..0eef246fb 100644 --- a/hotel/models/hotel_room_type_restriction.py +++ b/hotel/models/hotel_room_type_restriction.py @@ -17,6 +17,9 @@ class HotelRoomTypeRestriction(models.Model): active = fields.Boolean('Active', default=True, help='If unchecked, it will allow you to hide the ' 'restriction plan without removing it.') + # TODO: Review this relationship. + # 1. How to create a new hotel if hotel_property.restriction_id is required? + # 2. If you delete the hotel_id from the hotel is also deleted hotel_ids = fields.One2many('hotel.property', 'restriction_id', string='Hotel', default=_get_default_hotel, required=True) diff --git a/hotel/models/hotel_room_type_restriction_item.py b/hotel/models/hotel_room_type_restriction_item.py index f99add79a..e718349a7 100644 --- a/hotel/models/hotel_room_type_restriction_item.py +++ b/hotel/models/hotel_room_type_restriction_item.py @@ -21,10 +21,6 @@ class HotelRoomTypeRestrictionItem(models.Model): closed = fields.Boolean('Closed') closed_departure = fields.Boolean('Closed Departure') closed_arrival = fields.Boolean('Closed Arrival') - hotel_ids = fields.One2many('hotel.property', - 'restriction_id', string='Restriction Plan', - store=True, readonly=True, - related='restriction_id.hotel_ids') _sql_constraints = [('room_type_registry_unique', 'unique(restriction_id, room_type_id, date)',