From 6820ab8e1765c54af17fa36f14b56460f891c15c Mon Sep 17 00:00:00 2001 From: Dario Lodeiros Date: Sun, 27 Jan 2019 17:38:55 +0100 Subject: [PATCH] [WIP] Invoice WorkFlow --- hotel/models/hotel_checkin_partner.py | 4 ++-- hotel/views/hotel_reservation_views.xml | 13 ++++++++++++ .../models/inherited_hotel_reservation.py | 20 +------------------ 3 files changed, 16 insertions(+), 21 deletions(-) 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 +