From d33061009ed6a8d946d339b2451942851fb29480 Mon Sep 17 00:00:00 2001 From: Dario Lodeiros Date: Wed, 5 Jun 2019 17:06:09 +0200 Subject: [PATCH] [IMP] Confirm reservations modifications --- .../models/hotel_reservation/importer.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hotel_channel_connector_wubook/models/hotel_reservation/importer.py b/hotel_channel_connector_wubook/models/hotel_reservation/importer.py index 4696b43a8..a6d6d68a8 100644 --- a/hotel_channel_connector_wubook/models/hotel_reservation/importer.py +++ b/hotel_channel_connector_wubook/models/hotel_reservation/importer.py @@ -316,9 +316,6 @@ class HotelReservationImporter(Component): ) if reservation: reservation = reservation[0] - state = 'booking' if any( - checkin.status == 'booking' for checkin \ - in reservation.checkin_partner_ids) else 'confirm' vals = { 'channel_raw_data': json.dumps(book), 'channel_status': str(book['status']), @@ -326,9 +323,9 @@ class HotelReservationImporter(Component): 'to_assign': True, 'customer_notes': book['customer_notes'], 'channel_total_amount': book['amount'], - 'state': state, 'external_id': str(book['reservation_code']), } + reservation.odoo_id.confirm() reservation.with_context({'connector_no_export': True}).write(vals) reservations -= reservation else: