diff --git a/hotel/models/hotel_reservation.py b/hotel/models/hotel_reservation.py index 6fa35c51b..27ff6d72d 100644 --- a/hotel/models/hotel_reservation.py +++ b/hotel/models/hotel_reservation.py @@ -240,13 +240,7 @@ class HotelReservation(models.Model): company_id = fields.Many2one(related='folio_id.company_id', string='Company', store=True, readonly=True) reservation_line_ids = fields.One2many('hotel.reservation.line', 'reservation_id', - readonly=True, required=True, - states={ - 'draft': [('readonly', False)], - 'sent': [('readonly', False)], - 'confirm': [('readonly', False)], - 'booking': [('readonly', False)], - }) + required=True) service_ids = fields.One2many('hotel.service', 'ser_room_line') pricelist_id = fields.Many2one('product.pricelist', diff --git a/hotel/views/hotel_reservation_views.xml b/hotel/views/hotel_reservation_views.xml index 2334cddf0..0e0b223ed 100644 --- a/hotel/views/hotel_reservation_views.xml +++ b/hotel/views/hotel_reservation_views.xml @@ -294,7 +294,7 @@ type="action" icon="fa-bolt"/> - + {'readonly': [('is_from_ota','=',True),('able_to_modify_channel','=',False)]} - - {'readonly': [('is_from_ota','=',True),('able_to_modify_channel','=',False)]} + + {'readonly': [('parent.is_from_ota','=',True),('parent.able_to_modify_channel','=',False)]} + True