diff --git a/website_event_compassion/models/event_registration.py b/website_event_compassion/models/event_registration.py index 859c479..1c4af18 100644 --- a/website_event_compassion/models/event_registration.py +++ b/website_event_compassion/models/event_registration.py @@ -624,11 +624,11 @@ def create_trip_invoice(self): if len(travel_ticket) > 1: # Take the price set at the date of registration travel_ticket = travel_ticket.filtered( - lambda t, reg=registration: t.start_sale_date - or reg.create_date.date() + lambda t, reg=registration: ( + t.start_sale_date or reg.create_date.date() + ) <= reg.create_date.date() - <= t.end_sale_date - or reg.create_date.date() + <= (t.end_sale_date or reg.create_date.date()) )[:1] room_ticket = registration.event_id.event_ticket_ids.filtered( lambda t: t.product_id.product_tmpl_id == single_room_cost