[FIX] use men for number of adults before search for guest key

This commit is contained in:
Pablo
2019-03-12 11:42:43 +01:00
parent e6dd06c1c7
commit ecf36faea6

View File

@@ -99,7 +99,8 @@ class HotelReservationImporter(Component):
split_booking, dates_checkin, dates_checkout, real_checkin, real_checkout, book): split_booking, dates_checkin, dates_checkout, real_checkin, real_checkout, book):
is_cancellation = book['status'] in WUBOOK_STATUS_BAD is_cancellation = book['status'] in WUBOOK_STATUS_BAD
tax_inclusive = True tax_inclusive = True
persons = room_type_bind.ota_capacity # men = Number of adults (when not defined, equal to -1)
persons = book.get('men', -1) > -1 and book.get('men') or room_type_bind.ota_capacity
# Dates # Dates
real_checkin_str = real_checkin.strftime( real_checkin_str = real_checkin.strftime(
DEFAULT_SERVER_DATETIME_FORMAT) DEFAULT_SERVER_DATETIME_FORMAT)