Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][MIG] resource_booking: Migration to 16.0 #101

Closed
wants to merge 61 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
3b1b153
[ADD] resource_booking: new app to manage bookings
Apr 27, 2021
f9a07cc
Translated using Weblate (Spanish)
Apr 30, 2021
9d3ff11
[IMP] resource_booking: filter/group by date
Apr 30, 2021
6735a84
[FIX] resource_calendar: ignore past or unconfirmed bookings when upd…
May 6, 2021
c474bd6
[FIX] resource_booking: always notify in resource TZ
Jun 8, 2021
a0babfa
[FIX] resource_booking: Limit constraint only to future bookings
joao-p-marques Jun 18, 2021
3782ef2
[IMP] resource_booking: black, isort, prettier
Jul 13, 2021
9c6d7a3
[IMP] resource_booking: simplified time format
Jul 19, 2021
e4b2cc6
[MIG] resource_booking: migrate to v13
Jul 14, 2021
9d5b621
[IMP] resource_booking: use duration field instead of stop
Jul 23, 2021
2da2331
[IMP] resource_booking: configurable auto-assigned combination and lo…
Jul 23, 2021
8f3a0ba
[FIX] resource_booking: "Involves me" filter
Jul 26, 2021
f4289f8
[IMP] resource_booking: compatible with hr_holidays_public
Jul 26, 2021
1334dea
[IMP] resource_booking: optional name propagated to meeting
Jul 27, 2021
d13d035
[FIX] resource_booking: error when recurrent meetings exist
Jul 28, 2021
1c49c07
[FIX] resource_booking: Proper calendar.event unlink signature
pedrobaeza Jul 28, 2021
0880ad1
[FIX] resource_booking: access error on normal calendar
Jul 29, 2021
77a2c0b
[FIX] resource_booking: allow combination with other kind of leaves
Jul 29, 2021
7f706cc
[FIX] resource_booking: display location and duration on portal
Jul 29, 2021
eb8bcd5
[IMP] resource_booking: autoconfirm meeting attendees
Jul 29, 2021
e59ca4a
[IMP] resource_booking: improve auto-assignment readability
Jul 30, 2021
16d82c7
[IMP] resource_booking: add organizer
Jul 30, 2021
0ee10ac
[FIX] resource_booking: suggest involved partners as followers
Aug 2, 2021
e754182
Added translation using Weblate (French (France))
abdawone Sep 24, 2021
ed538e2
Added translation using Weblate (French)
abdawone Sep 25, 2021
e9437a6
[FIX] resource_booking: autosubscribe resource partners
Sep 27, 2021
1a1365e
[FIX] resource_booking: correct assignment message
Sep 28, 2021
10e6210
[FIX] resource_booking: suggest requester to messaging
Oct 20, 2021
81c232c
[FIX] resource_booking: allow creating if type has categories
Oct 22, 2021
8359380
[FIX] resource_booking: free meetings by default
Oct 26, 2021
05d0b28
[FIX]start_next_previous
jguenat Oct 30, 2021
e387e50
[IMP] resource_booking: faster tests
Nov 5, 2021
127135d
[FIX] Avoid sending notifications when public user
Nov 8, 2021
5b301df
[FIX] resource_booking: performance
chienandalu Mar 14, 2022
f45fa27
[IMP] resource_booking: pre-commit stuff
pedrobaeza Oct 23, 2022
985fb01
[MIG] resource_booking: Migration to 14.0
pedrobaeza Oct 24, 2022
61b8840
[IMP] add description field to bookings
huguesdk Feb 17, 2023
cde4dce
[IMP] resource_booking: Create resource.is_available() convenience fu…
carmenbianca Feb 9, 2023
28b0c1a
[IMP] resource_booking: Change the position of the description field …
victoralmau Feb 27, 2023
ef4f8f7
[FIX] resource_booking: Don't fail with multiple internal attendees
pedrobaeza Mar 1, 2023
e811e46
Added translation using Weblate (Catalan)
eugenichafer Mar 2, 2023
a73891c
Translated using Weblate (Catalan)
eugenichafer Mar 2, 2023
7335f21
[FIX] resource_booking: Allow non RB users to handle calendar events
pedrobaeza Mar 6, 2023
a24ebc3
[IMP] resource_booking: Add description to calendar view card
carmenbianca Mar 30, 2023
47a12fb
[FIX] resource_booking: Force to send calendar event author notification
victoralmau Mar 13, 2023
980c560
[MIG] resource_booking: Migration to 15.0
victoralmau Mar 3, 2023
517fa48
[UPD] Update resource_booking.pot
Apr 5, 2023
427df80
[UPD] README.rst
OCA-git-bot Apr 5, 2023
aaf53f6
Update translation files
weblate Apr 5, 2023
a9df0e6
[IMP] resource_booking: Use _prepare_home_portal_values() function.
victoralmau Apr 25, 2023
18d9704
[FIX] resource_booking: Change _default_company() to self.env.company…
victoralmau Apr 25, 2023
500de1d
[IMP] resource_booking: Change t-esc directives to t-out according to…
victoralmau Apr 25, 2023
d609557
[IMP] resource_booking: Partial change from tour test to js
victoralmau Apr 25, 2023
ae8b174
resource_booking 15.0.1.1.0
OCA-git-bot May 16, 2023
ca87e41
[IMP] resource_booking: Allow a booking to span more than one calenda…
carmenbianca Jan 31, 2023
ae28c1e
[UPD] README.rst
OCA-git-bot Sep 3, 2023
c3f593b
oca-github-bot post-merge updates
OCA-git-bot Sep 19, 2023
4356c87
[IMP] resource_booking: pre-commit stuff
norlinhenrik Sep 19, 2023
3e30383
[MIG] resource_booking: Migration to 16.0
norlinhenrik Aug 28, 2023
009ad08
[FIX] resource_booking: _get_available_slots
norlinhenrik Sep 21, 2023
819b914
[IMP] resource_booking: add freezegun as a python external dependency
rrebollo Jan 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ env:

# See https://github.com/OCA/odoo-community.org/issues/37#issuecomment-470686449
parserOptions:
ecmaVersion: 2019
ecmaVersion: 11
sourceType: module

overrides:
- files:
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# generated from manifests external_dependencies
cssselect
217 changes: 217 additions & 0 deletions resource_booking/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
================
Resource booking
================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:2a7f2a32fec85849182a06dcf2daaae0efca0d9e6eb26893dedc0ff2151c0333
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
:target: https://odoo-community.org/page/development-status
:alt: Production/Stable
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcalendar-lightgray.png?logo=github
:target: https://github.com/OCA/calendar/tree/16.0/resource_booking
:alt: OCA/calendar
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/calendar-16-0/calendar-16-0-resource_booking
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/calendar&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

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.

**Table of contents**

.. contents::
:local:

Installation
============

To install this module, you need to install these dependencies:

#. `freezegun <https://github.com/spulec/freezegun>`__
#. `web_calendar_slot_duration <https://odoo-community.org/shop/product/calendar-slot-duration-6202>`__

When someone is a manager, he will have access to *Resource Bookings >
Configuration*, where he will be able to configure resources, leaves and
schedules. This menu is just provided as a shortcut. However, if you want to
manage that stuff more comfortably:

* To manage human resources, install `hr <https://apps.odoo.com/app/employees>`__.
* To manage their leaves, install `hr_holidays <https://apps.odoo.com/app/time-off>`__.
* To manage work centers, install `mrp <https://apps.odoo.com/app/manufacturing>`__.

Configuration
=============

To let some backend user to book resources:

#. Go to *Settings > Users & Companies > Users*.
#. Pick or create one.
#. Assign *Resource Booking > User*.

To let some backend user to configure types and combinations, and to be able to
modify overdue bookings:

#. Go to *Settings > Users & Companies > Users*.
#. Pick or create one.
#. Assign *Resource Booking > Manager*.

To configure one booking type:

#. Go to *Resource Bookings > Types*.
#. Create one.
#. Give it a *name*.
#. Set the *Duration*, to know the time assigned to each calendar slot. It will
also be the default duration for each booking, although that can be changed
later if necessary.
#. Set the *Modifications Deadline*, to forbid non-managers to alter dates of
a booking when it's too late.
#. Choose one *Availability Calendar*. No bookings will exist outside of it.
#. Under *Meeting defaults*, you will be able to fill some values that will
be used by default on calendar meetings. These will appear in the global
calendar when some booking is reserved.
#. Choose some *Available resource combinations*. All combinations in the same
line must be free to be booked together; otherwise the booking will not be
able to be scheduled. You can sort them.
#. Pick up one *Combination Assignment*. If you choose *Sorted*, then the order
of the combinations you chose will indicate the one that is selected first.
Of course, it must be free to be selected.
#. Save.

Usage
=====

This module installs a new app, "Resource bookings".

Bookings may involve you:

* Maybe because you requested to book something.
* Maybe because you are one of the booked resources, if a booking represents
some kind of appointment.

To see which bookings involve you:

#. Go to *Resource Bookings > Bookings*.
#. You can switch to the list view if you need to see also the pending ones.
#. You can remove the "Involving me" filter if you want to see others' bookings.

To book some resources:

#. Go to *Resource Bookings > Types*.
#. Pick the type of booking you want.
#. Click on *Booking Count*.
#. Click on a free slot.
#. Fill the *Requester*, which may or not be yourself.
#. Uncheck *Auto assign* and pick one *Resources combination*, in case the one
assigned automatically isn't the one you want.

To invite someone to book a resource combination from the portal:

#. Go to *Resource Bookings > Types*.
#. Pick the type of booking you want.
#. Click on *Booking Count*.
#. Click on the list view icon.
#. Click on *Create*.
#. Fill the *Requester*.
#. Uncheck *Auto assign* and pick one *Resources combination*, if you want that
the requester is assigned to that combination. Otherwise, leave it empty,
and some free combination will be assigned automatically when the requester
picks a free slot.
#. Choose the *duration*, in case it is different from the one specified in the
resource booking type.
#. Click on *Share > Send*.
#. The requester will receive an email to select a calendar slot from his portal.

Known issues / Roadmap
======================

* Allow combination auto-assignment based on least used combination.
* Allow customer to choose combination.
* Some error messages would be a bit more helpful if they specify the schedule
impossibility reason, but that should be done without affecting performance.
* Optimize ``_calendar_event_busy_intervals()`` to make it work in batch.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/calendar/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/calendar/issues/new?body=module:%20resource_booking%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Tecnativa

Contributors
~~~~~~~~~~~~

* Jairo Llopis <[email protected]> (https://www.tecnativa.com/)
* Henrik Norlin (https://ows.cloud)

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-pedrobaeza| image:: https://github.com/pedrobaeza.png?size=40px
:target: https://github.com/pedrobaeza
:alt: pedrobaeza
.. |maintainer-ows-cloud| image:: https://github.com/ows-cloud.png?size=40px
:target: https://github.com/ows-cloud
:alt: ows-cloud

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-pedrobaeza| |maintainer-ows-cloud|

This module is part of the `OCA/calendar <https://github.com/OCA/calendar/tree/16.0/resource_booking>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions resource_booking/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import controllers
52 changes: 52 additions & 0 deletions resource_booking/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Copyright 2021 Tecnativa - Jairo Llopis
# Copyright 2022 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Resource booking",
"summary": "Manage appointments and resource booking",
"version": "16.0.1.0.0",
"development_status": "Production/Stable",
"category": "Appointments",
"website": "https://github.com/OCA/calendar",
"author": "Tecnativa, Odoo Community Association (OCA)",
"maintainers": ["pedrobaeza", "ows-cloud"],
"license": "AGPL-3",
"application": True,
"installable": True,
"external_dependencies": {
"python": [
# Used implicitly
"cssselect",
],
},
"depends": [
"calendar",
"mail",
"portal",
"resource",
"web_calendar_slot_duration",
],
"data": [
"data/mail.xml",
"security/resource_booking_security.xml",
"security/ir.model.access.csv",
"templates/portal.xml",
"views/calendar_event_views.xml",
"views/res_partner_views.xml",
"views/resource_booking_combination_views.xml",
"views/resource_booking_type_views.xml",
"views/resource_booking_views.xml",
"views/menus.xml",
],
"assets": {
"web.assets_frontend": [
"resource_booking/static/src/js/booking_portal.js",
"resource_booking/static/src/scss/portal.scss",
],
"web.assets_tests": [
"resource_booking/static/src/js/tours/resource_booking_tour.js"
],
},
"demo": ["demo/res_users_demo.xml"],
}
1 change: 1 addition & 0 deletions resource_booking/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import portal
Loading
Loading