-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
[IMP+FIX] resource_booking: duration, location, involves me, hr_holidays_public #34
[IMP+FIX] resource_booking: duration, location, involves me, hr_holidays_public #34
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
b14a37f
to
c7a4ddf
Compare
All done. Please keep in mind that this will have to be merged with "nobump", as it includes the version bump needed to test migration scripts. |
From now on, `resource.booking.type` duration represents the default duration that will be applied to new `resource.booking` of that type, instead of the hardcoded duration for every new booking. This means that you can create a new booking in pending state and define a custom duration before sending the portal link to customer. Thus, the available schedule slots in portal will be based on the type duration, whereas only those that have enough time left to complete the booking duration will be displayed. @Tecnativa TT30987
…cation Thanks to this patch, you will be able to more predictably block the chosen resource combination, with the added checkbox. Also, the location field is propagated to `resource.booking` records, and synced from there to `calendar.event` if needed. This way, you can alter the location before sending the portal invitation. @Tecnativa TT30987
c7a4ddf
to
1cd849d
Compare
The filter wasn't working fine due to the `auto_join=True` set in `meeting_id`. It was never displaying pending bookings. Besides, it wasn't necessary to keep it as a field because it was displayed nowhere and the search could be done directly in the view. This way, there's less python code to maintain and we disable the possibility of having a negative domain, which enters doomed scenarios when x2many fields are involved (see odoo/odoo#43957). @Tecnativa TT30987
Adding `.with_context(exclude_public_holidays=True)` in needed places to let `hr_holidays_public` do its magic and never allow allocating a booking during a public holidays when that module is properly installed and configured. @Tecnativa TT30987
Updated description to reflect current state of the PR, which has 4 different feature sets. Ready to review/merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still missing the name
field on the resource.booking, needed for setting the meeting topic and to be transferred to the calendar.event.
Currently the name is computed based on the date, requester and type, and it's propagated to the calendar meeting. That's on purpose because originally having to add a name would be uncomfortable and unnecessary, because basically every booking of the same type has the same purpose. Also, when placing a booking from e-commerce, we don't want the customer to have to write a name; that adds no value. I can add the |
I want to add a free text. For example: "Meeting about module X". And the title of the calendar.event should be that one, and in the portal that should be also. You tell me the technical specifications for that. |
Ok, but I mean that we need to make that optional. We can't require the name field to be filled, or we'll break the original purpose of the module. |
It can be optional indeed. |
- Allow users to optionally define a name for the resource booking. - Display that name in portal if set. - Sync it with meeting name when creating it. @Tecnativa TT30987
Custom optional name added (see last video on description). |
/ocabot merge nobump |
Hey, thanks for contributing! Proceeding to merge this for you. |
This PR has the |
Congratulations, your PR was merged at 8996fb0. Thanks a lot for contributing to OCA. ❤️ |
Missing part from OCA#34: - Display booking duration and location on portal, even on pending state. - Improve portal test to contemplate new behaviors. @Tecnativa TT31250
Missing part from OCA#34: - Display booking duration and location on portal, even on pending state. - Improve portal test to contemplate new behaviors. @Tecnativa TT31250
Missing part from OCA#34: - Display booking duration and location on portal, even on pending state. - Improve portal test to contemplate new behaviors. @Tecnativa TT31250
Missing part from OCA#34: - Display booking duration and location on portal, even on pending state. - Improve portal test to contemplate new behaviors. @Tecnativa TT31250
Missing part from OCA#34: - Display booking duration and location on portal, even on pending state. - Improve portal test to contemplate new behaviors. @Tecnativa TT31250
Missing part from OCA#34: - Display booking duration and location on portal, even on pending state. - Improve portal test to contemplate new behaviors. @Tecnativa TT31250
Missing part from OCA#34: - Display booking duration and location on portal, even on pending state. - Improve portal test to contemplate new behaviors. @Tecnativa TT31250
Missing part from OCA#34: - Display booking duration and location on portal, even on pending state. - Improve portal test to contemplate new behaviors. @Tecnativa TT31250
Missing part from OCA#34: - Display booking duration and location on portal, even on pending state. - Improve portal test to contemplate new behaviors. @Tecnativa TT31250
This PR includes several improvements or fixes for the
resource_booking
module:[IMP] resource_booking: use duration field instead of stop
From now on,
resource.booking.type
duration represents the default duration that will be applied to newresource.booking
of that type, instead of the hardcoded duration for every new booking.This means that you can create a new booking in pending state and define a custom duration before sending the portal link to customer.
Thus, the available schedule slots in portal will be based on the type duration, whereas only those that have enough time left to complete the booking duration will be displayed.
[IMP] resource_booking: configurable auto-assigned combination and location
Thanks to this patch, you will be able to more predictably block the chosen resource combination, with the added checkbox.
Also, the location field is propagated to
resource.booking
records, and synced from there tocalendar.event
if needed. This way, you can alter the location before sending the portal invitation.[FIX] resource_booking: "Involves me" filter
The filter wasn't working fine due to the
auto_join=True
set inmeeting_id
. It was never displaying pending bookings.Besides, it wasn't necessary to keep it as a field because it was displayed nowhere and the search could be done directly in the view. This way, there's less python code to maintain and we disable the possibility of having a negative domain, which enters doomed scenarios when x2many fields are involved (see odoo/odoo#43957).
[IMP] resource_booking: compatible with hr_holidays_public
Adding
.with_context(exclude_public_holidays=True)
in needed places to lethr_holidays_public
do its magic and never allow allocating a booking during a public holidays when that module is properly installed and configured.[IMP] resource_booking: optional name propagated to meeting
Peek.27-07-2021.09-55.mp4
@Tecnativa TT30987