Room booking: hooks on booking?


are there any hooks for bookings to use in an plugin?


We have some rooms that are dividable, so if a subdivision is booked, then the complete room needs to get blocked, and vice-versa.
My current idea is to set up 3 rooms ( full room + divided 1 + divided 2) and automatically create the appropriate blockings.

You could try using these signals:

booking_created = _signals.signal('booking-created', """
Executed after a booking has been successfully created. The *sender*
is the new `Reservation` object.

booking_state_changed = _signals.signal('booking-state-changed', """
Executed after a booking has been cancelled/rejected/accepted. The *sender*
is the `Reservation` object.

booking_deleted = _signals.signal('booking-deleted', """
Executed after a booking has been deleted. The *sender* is the `Reservation` object.

booking_occurrence_state_changed = _signals.signal('booking-occurrence-state-changed', """
Executed after the state of a booking occurrence changed.
The *sender* is the `ReservationOccurrence` object.

However, room blockings only use dates, not times, so you’d need to create actual bookings in the other rooms.

Thanks, that should work.

I think I now have a basic working solution:

Configuration is still very simple, but at least for our use case the rooms will seldom change.