From 4d025c1134e31aa2c9aebb1f2353e192bddb4e8c Mon Sep 17 00:00:00 2001 From: Pablo Date: Mon, 27 May 2019 18:08:32 +0200 Subject: [PATCH] [UPD] Do not search for existing partners by email --- .../models/hotel_reservation/importer.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/hotel_channel_connector_wubook/models/hotel_reservation/importer.py b/hotel_channel_connector_wubook/models/hotel_reservation/importer.py index 6bc1975a2..cc6eb5173 100644 --- a/hotel_channel_connector_wubook/models/hotel_reservation/importer.py +++ b/hotel_channel_connector_wubook/models/hotel_reservation/importer.py @@ -350,15 +350,8 @@ class HotelReservationImporter(Component): processed_rids.append(rcode) continue - # Search Customer - customer_mail = book.get('customer_mail', False) - partner_id = False - if customer_mail: - partner_id = res_partner_obj.search([ - ('email', '=', customer_mail) - ], limit=1) - if not partner_id: - partner_id = res_partner_obj.create(self._generate_partner_vals(book)) + # Create new Customer + partner_id = res_partner_obj.create(self._generate_partner_vals(book)) reservations = [] used_rooms = []