diff --git a/hotel/models/hotel_checkin_partner.py b/hotel/models/hotel_checkin_partner.py index 3e24f4f53..5fe511faa 100644 --- a/hotel/models/hotel_checkin_partner.py +++ b/hotel/models/hotel_checkin_partner.py @@ -20,10 +20,10 @@ class HotelCheckinPartner(models.Model): def _default_folio_id(self): if 'folio_id' in self.env.context: folio = self.env['hotel.folio'].browse([ - self.env.context['reservation_id'] + self.env.context['folio_id'] ]) return folio - raise ValidationError(_('You only can create checkin from reservations or folios')) + return False def _default_enter_date(self): if 'reservation_id' in self.env.context: diff --git a/hotel/views/hotel_reservation_views.xml b/hotel/views/hotel_reservation_views.xml index e20d75aca..43acee8c1 100644 --- a/hotel/views/hotel_reservation_views.xml +++ b/hotel/views/hotel_reservation_views.xml @@ -97,6 +97,19 @@ Books +