TIP: You can type at any time to perform a new search.
Resource booking
resource_booking · OCA/calendar
- Repository
- OCA/calendar · module folder · Try on Runboat
- Module version
- Category
- Appointments
- Folder size
- 1.18 MB
- License
- AGPL-3
- Application
- Yes
- Auto-installable
- No
- Website
- https://github.com/OCA/calendar
- Last tracking update
- 2026-08-17 18:05:57
- Authors
- Odoo Community Association (OCA), Tecnativa
- Maintainers
- Odoo Community Association (OCA), Tecnativa
- Committers
- Don Kendall, Weblate, OCA-git-bot, oca-ci, thierry-cmd
- Odoo dependencies
- Python dependencies
- cssselect
- System dependencies
- None
- Required by
- sale_resource_booking, survey_resource_booking
- Description
This module adds a new app to allow you to book resource combinations in given schedules. Example use cases: - Management of consultations in a clinic. - Salesman appointments. - Classroom and projector reservations. - Hotel room booking. Among the things you can do: - Specify the type of booking, which includes a calendar of availability. - Specify which resources can be booked together. All of them must be free to be booked. - Place pending bookings, effectively giving permissions to someone to see the availability calendar and choose one slot. - Partners can do that from their portals. - If a partner has no user, he can still do the same via a tokenized URL. - Backend users can also do that from the backend. - Booking lifecycle with computed states. - Automatic meeting creation and deletion. - Automatic conflict detection. - Deadline to block modifications.
Code Analysis ⓘ
Views touched (23)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
alert_availability_lost |
Alert Resource Booking Availability was Lost | ir.ui.view | qweb | New |
mail_activity_schedule_view_form |
mail.activity.schedule.inherit.calendar | mail.activity.schedule | calendar | Inherits mail.mail_activity_schedule_view_form |
mail_activity_view_form_popup |
mail.activity.form.inherit.booking | mail.activity | form | Inherits mail.mail_activity_view_form_popup |
message_combination_assigned |
message_combination_assigned | ir.ui.view | qweb | New |
portal_breadcrumbs |
portal_breadcrumbs | ir.ui.view | qweb | Inherits portal.portal_breadcrumbs |
portal_my_bookings |
My Bookings | ir.ui.view | qweb | New |
portal_my_home |
portal_my_home | ir.ui.view | qweb | Inherits portal.portal_my_home |
resource_booking_combination_view_form |
Resource booking combination form | resource.booking.combination | form | New |
resource_booking_combination_view_search |
resource.booking.combination.view.search | resource.booking.combination | search | New |
resource_booking_combination_view_tree |
Resource booking combination list | resource.booking.combination | list | New |
resource_booking_portal_form |
Booking portal form | ir.ui.view | qweb | New |
resource_booking_portal_header |
Resource Booking Header | ir.ui.view | qweb | New |
resource_booking_portal_schedule |
Resource Booking Scheduling | ir.ui.view | qweb | New |
resource_booking_type_view_form |
Resource booking type form | resource.booking.type | form | New |
resource_booking_type_view_search |
resource.booking.type.view.search | resource.booking.type | search | New |
resource_booking_type_view_tree |
Resource booking type list | resource.booking.type | list | New |
resource_booking_view_calendar |
Resource booking calendar | resource.booking | calendar | New |
resource_booking_view_form |
Resource booking form | resource.booking | form | New |
resource_booking_view_search |
resource.booking.view.search | resource.booking | search | New |
resource_booking_view_tree |
Resource booking list | resource.booking | list | New |
scheduling_calendar |
Resource Booking Calendar | ir.ui.view | qweb | New |
view_calendar_event_form |
calendar.event.view.form.inherit | calendar.event | form | Inherits calendar.view_calendar_event_form |
view_partner_form |
res.partner | form | Inherits base.view_partner_form |
HTTP endpoints (5)
| Route(s) | Handler | Auth | Type | Methods | Flags |
|---|---|---|---|---|---|
/my/bookings/<int:booking_id>/cancel |
CustomerPortal.portal_booking_cancel |
public | http | ALL | website |
/my/bookings/<int:booking_id>/confirm |
CustomerPortal.portal_booking_confirm |
public | http | ALL | website |
/my/bookings/<int:booking_id> |
CustomerPortal.portal_booking_page |
public | http | ALL | website |
/my/bookings/<int:booking_id>/schedule, /my/bookings/<int:booking_id>/schedule/<int:year>/<int:month> |
CustomerPortal.portal_booking_schedule |
public | http | ALL | website |
/my/bookings, /my/bookings/page/<int:page> |
CustomerPortal.portal_my_bookings |
user | http | ALL | website |
Models touched (12)
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (1)
-
resource_booking_idsOne2many → resource.bookingcomodel_name='resource.booking'inverse_name='meeting_id'string='Resource booking'
-
create(self, vals_list)@api.model_create_multiTransfer resource booking to _attendees_values by context. We need to serialize the creation in that case. mail_notify_author key from context is necessary to force the notification to be sent to author. -
unlink(self)Check you're allowed to unschedule it. -
write(self, vals)Check you're allowed to reschedule it.
New fields (1)
-
booking_idMany2one → resource.bookingondelete='cascade'string='Resource booking' args: 'resource.booking'
-
action_open_resource_booking(self)
New fields (0)
No new fields.
Public methods (1)-
action_open_resource_booking(self)
New fields (1)
-
categorySelectionselection_add=[('resource_booking', 'Resource booking')]
No public methods.
New fields (2)
-
resource_booking_countIntegercompute='_compute_resource_booking_count'string='Resource booking count' -
resource_booking_idsMany2many → resource.bookingcolumn1='res_partner_id'column2='resource_booking_id'comodel_name='resource.booking'copy=Falserelation='res_partner_resource_booking_rel'string='Bookings'
-
action_view_resource_booking(self)
New fields (21)
-
activeBooleandefault=True -
booking_activity_idsOne2many → mail.activitystring='Booking Activities' args: 'mail.activity', 'booking_id' -
categ_idsMany2many → calendar.event.typecomodel_name='calendar.event.type'string='Tags' -
combination_auto_assignBooleandefault=Truehelp='When checked, resource combinations will be (un)assigned automatically based on their availability during the booking dates.'string='Auto assigned' -
combination_idMany2one → resource.booking.combinationcomodel_name='resource.booking.combination'compute='_compute_combination_id'copy=Falsedomain="[('type_rel_ids.type_id', 'in', [type_id])]"index=Truereadonly=Falsestore=Truestring='Resources combination'tracking=True -
descriptionHtml -
durationFloatcompute='_compute_duration'help='Amount of time that the resources will be booked and unavailable for others.'readonly=Falsestore=Truetracking=True -
is_modifiableBooleancompute='_compute_is_modifiable' -
is_overdueBooleancompute='_compute_is_overdue' -
locationCharcompute='_compute_location'readonly=Falsestore=True -
meeting_idMany2one → calendar.eventcomodel_name='calendar.event'context={'default_res_id': False, 'default_res_model': False}copy=Falsehelp='Meeting confirmed for this booking.'index=Trueondelete='set null'string='Meeting' -
nameCharhelp='Leave empty to autogenerate a booking name.'index=True -
partner_idMany2one → res.partnercomodel_name='res.partner'compute='_compute_partner_id'inverse='_inverse_partner_id'readonly=Falsesearch='_search_partner_id'string='Requester' -
partner_idsMany2many → res.partnercomodel_name='res.partner'help='Who will attend this booking?'relation='res_partner_resource_booking_rel'required=Truestring='Attendees'tracking=True -
requester_adviceTextreadonly=Truerelated='type_id.requester_advice' -
startDatetimecompute='_compute_start'copy=Falseindex=Truereadonly=Falsestore=Truetracking=True -
stateSelectioncompute='_compute_state'default='pending'help='Pending: No meeting scheduled.\nScheduled: The requester has not confirmed attendance yet.\nConfirmed: Meeting scheduled, and requester attendance confirmed.\nCanceled: Meeting removed, booking archived.'index=Truestore=Truetracking=True args: [('pending', 'Pending'), ('scheduled', 'Scheduled'), ('confirmed', 'Confirmed'), ('canceled', 'Canceled')] -
stopDatetimecompute='_compute_stop'copy=Falseindex=Truestore=Truetracking=True -
type_idMany2one → resource.booking.typecomodel_name='resource.booking.type'index=Trueondelete='cascade'required=Truestring='Type'tracking=True -
user_idMany2one → res.userscomodel_name='res.users'compute='_compute_user_id'default=<expr>help='Who organized this booking? Usually whoever created the record. It will appear as the calendar event organizer, when scheduled, and calendar notifications will be sent in his/her name.'index=Truereadonly=Falsestore=Truestring='Organizer'tracking=True -
videocall_locationCharcompute='_compute_videocall_location'readonly=Falsestore=Truestring='Meeting URL'
-
action_cancel(self)Cancel this booking. -
action_confirm(self)Confirm own and requesting partner's attendance. -
action_open_portal(self) -
action_schedule(self)Redirect user to a simpler way to schedule this booking. -
action_unschedule(self)Remove associated meetings. -
create(self, vals_list)@api.model_create_multiSync booking with meeting if needed. -
unlink(self)Unlink meeting if needed. -
write(self, vals)Sync booking with meeting if needed.
New fields (8)
-
activeBooleandefault=True -
booking_countIntegercompute='_compute_booking_count'string='Booking count' -
booking_idsOne2many → resource.bookingcomodel_name='resource.booking'inverse_name='combination_id'string='Bookings' -
forced_calendar_idMany2one → resource.calendarcomodel_name='resource.calendar'help="Force a specific calendar, instead of combining the resources'."index=Truestring='Forced calendar' -
nameCharcompute='_compute_name'store=True -
resource_idsMany2many → resource.resourcecomodel_name='resource.resource'help='Resources that must be free to be booked together.'required=Truestring='Resources' -
type_countIntegercompute='_compute_type_count'string='Booking types' -
type_rel_idsOne2many → resource.booking.type.combination.relcomodel_name='resource.booking.type.combination.rel'help='Resource booking types where this combination is available.'inverse_name='combination_id'string='Resource booking types'
-
action_open_bookings(self) -
action_open_resource_booking_types(self)
New fields (16)
-
activeBooleandefault=True -
alarm_idsMany2many → calendar.alarmcomodel_name='calendar.alarm'help='Meetings will be created with these reminders by default.'string='Default reminders' -
booking_countIntegercompute='_compute_booking_count' -
booking_idsOne2many → resource.bookingcomodel_name='resource.booking'help='Bookings available for this type'inverse_name='type_id'string='Bookings' -
categ_idsMany2many → calendar.event.typecomodel_name='calendar.event.type'help='Meetings will be created with these tags by default.'string='Default tags' -
combination_assignmentSelectiondefault='random'help='Choose how to auto-assign resource combinations. It has no effect if assigned manually.'required=True args: [('sorted', 'Sorted: pick the first one that is free'), ('random', 'Randomly: order is not important')] -
combination_rel_idsOne2many → resource.booking.type.combination.relcomodel_name='resource.booking.type.combination.rel'copy=Truehelp='Resource combinations available for this type of bookings.'inverse_name='type_id'string='Available resource combinations' -
company_idMany2one → res.companycomodel_name='res.company'default=<expr>help='Company where this booking type is available.'index=Truereadonly=Falsestore=Truestring='Company' -
durationFloatdefault=0.5help='Booking default duration.'required=True -
locationChar -
modifications_deadlineFloatdefault=24help='When this deadline has been exceeded, if a booking was not yet confirmed, it will be canceled automatically. Also, only booking managers will be able to unschedule or reschedule them. The value is expressed in hours.'required=True -
nameCharindex='trigram'required=Truetranslate=True -
requester_adviceTexthelp='Text that will appear by default in portal invitation emails and in calendar views for scheduling.'translate=True -
resource_calendar_idMany2one → resource.calendarcomodel_name='resource.calendar'default=<expr>help='Restrict bookings to this schedule.'index=Trueondelete='restrict'required=Truestring='Availability Calendar' -
slot_durationFloatdefault=0.5help='Interval offered to start each resource booking.'required=True -
videocall_locationCharstring='Meeting URL'
-
action_open_bookings(self)
New fields (4)
-
combination_idMany2one → resource.booking.combinationcomodel_name='resource.booking.combination'index=Trueondelete='cascade'required=Truestring='Combination' -
sequenceIntegerdefault=100index=Truerequired=True -
type_idMany2one → resource.booking.typecomodel_name='resource.booking.type'index=Trueondelete='cascade'required=Truestring='Type' -
type_nameCharrelated='type_id.name'
No public methods.
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (0)
No new fields.
Public methods (1)-
is_available(self, start_dt, end_dt, domain=None, tz=None)Convenience method to check whether a resource is available within a time span.
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…