From 64bf51d82083204d2b13488da861dab917fb32d4 Mon Sep 17 00:00:00 2001 From: Dario Lodeiros Date: Wed, 13 Mar 2019 21:32:32 +0100 Subject: [PATCH] [ADD] WorkFlow Preconfirm --- hotel/models/hotel_reservation.py | 5 ++--- hotel/views/hotel_reservation_views.xml | 18 +++++++----------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/hotel/models/hotel_reservation.py b/hotel/models/hotel_reservation.py index f0380f539..97fb3d684 100644 --- a/hotel/models/hotel_reservation.py +++ b/hotel/models/hotel_reservation.py @@ -369,9 +369,8 @@ class HotelReservation(models.Model): vals['real_checkin'] = vals['checkin'] vals['real_checkout'] = vals['checkout'] record = super(HotelReservation, self).create(vals) - #~ if (record.state == 'draft' and record.folio_id.state == 'sale') or \ - #~ record.preconfirm: - #~ record.confirm() + if record.preconfirm: + record.confirm() return record @api.multi diff --git a/hotel/views/hotel_reservation_views.xml b/hotel/views/hotel_reservation_views.xml index a7228e928..3255d2741 100644 --- a/hotel/views/hotel_reservation_views.xml +++ b/hotel/views/hotel_reservation_views.xml @@ -60,13 +60,6 @@ icon="fa-compress" attrs="{'invisible':[('splitted', '=', False)]}" /> -