[19.0][MIG] resource_booking: Migration to 19.0#217
Open
dnplkndll wants to merge 7 commits into
Open
Conversation
21d0bd2 to
aa94567
Compare
dnplkndll
added a commit
to ledoent/calendar
that referenced
this pull request
May 16, 2026
Odoo 19.0+ HttpCase tour tests leave renderer/websocket chrome subprocesses that don't exit when the parent is killed; Odoo's own test framework reports them via WARNING "Killing chrome descendants- or-self of N: M remaining". These are benign cleanup notifications emitted AFTER the test result line, not test failures. Without this ignore pattern, any 19.0 PR that includes tour tests in resource_booking (test_portal_no_bookings, test_portal_list_with_ bookings, etc.) deterministically fails CI even when 0 tests fail. This is an OCA-CI configuration fix, not a module change. Will be split into its own PR once verified on the OCA#217 retrigger.
2 tasks
Member
|
Please, cherry-pick #222 to commit history before migration commit. |
…ctly When using a booking type with a resource calendar that has a different time zone than the resource itself, the slots are returned with mixed time zones. This commit normalizes the behavior and ensures that slots are always returned in the time zone of the booking type. Steps to reproduce: Create a resource with the time zone America/Guayaquil, and a calendar that starts from 06:00 to 15:00. Create a resource booking type with a new calendar that starts from 09:00 to 16:00, and set the time zone to Europe/Madrid. Before this commit, the slot displayed in the portal was 06:00, but it should have been 12:00. After this commit, the slot is displayed in the correct time zone (Madrid) at 12:00. Note: The 06:00 in America/Guayaquil corresponds to 12:00 in Madrid standard time, not during daylight saving time. The tests use a freeze date in February.
When a user had no resource_booking permissions and opened a calendar event linked to a resource booking, he got an unnecessary access error.
…t read access
A user landing on /my that lacks resource.booking read access (e.g. an
internal user not in resource_booking.group_user, an internal account
created by another website-facing module) used to hit a hard AccessError:
- _prepare_home_portal_values called search_count([]) unguarded, breaking
the entire portal home page when "booking_count" was in counters.
- portal_my_bookings called search_count([]) unguarded, breaking the
/my/bookings listing for the same users.
Both paths now check Booking.has_access("read") and degrade gracefully
(zero counter, empty list page) instead of raising. Portal users with
the dedicated ACL row keep the existing behavior unchanged.
Distinct from upstream 1c59c21 ([FIX] resource_booking: access error on
normal calendar) which fixed a different surface: the calendar event
form's resource_booking_ids field now hidden via groups= for users
without booking permissions. The portal AccessError addressed here is
a separate bug.
Co-Authored-By: Brenden Eshbach <brenden@techsystech.com>
…ests Two follow-ups from review of the no-access fix: - portal_my_bookings: unify the no-access branch with the normal path. Previously the no-access branch returned an empty dict for `pager`, which is technically harmless because the current template doesn't read pager, but is fragile against future template inheritance. Now has_access is computed once, search_count is gated, and the rest of the function (real portal.pager(total=0), recordset, session, render) runs through the single existing code path. - Tests: replace fragile "no Traceback in response" assertions with positive DOM markers. Home test now asserts the .o_portal_my_home / .o_portal_wrap wrapper renders; listing test asserts the empty-state alert string from the QWeb template appears. Both confirm the template actually rendered rather than just "did not crash".
1b3bac2 to
52a2f0d
Compare
Contributor
Author
|
Done — cherry-picked both commits from #222 ( Side-effect note: my original CI re-running on the force-push. Branch: https://github.com/ledoent/calendar/tree/19.0-mig-resource_booking |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Forward-port of
resource_bookingfrom 18.0 to the 19.0 series.Supersedes #187
#187 has been open since 2025-10-19 with no maintainer response and is now 12 commits behind
upstream/19.0. The substantive migration work in this PR is unchanged from @tishmen's original PR — this PR re-bases it on current 19.0 and includes the two 18.0 fixes that have since merged upstream, preserved as separate commits with their original authorship (OCA convention for cherry-picked porting fixes).If @tishmen would prefer to take this over and refresh #187 directly, happy to defer — please tag me. Otherwise, recommend closing #187 in favor of this branch.
Companion PR — #218
This branch also carries #218 as commit
1b3bac2([FIX] checklog-odoo.cfg: ignore Killing chrome descendants-or-self warning). #218 is a tiny standalone repo-level config fix that brings OCA/calendar in line with the pattern already in OCA/web, OCA/server-ux, OCA/social, OCA/website and ~16 other OCA repos — without it, CI deterministically fails on the chrome-zombie WARNING from resource_booking's tour tests despite 0 actual test failures.Reviewers: please merge #218 first; this PR will then rebase cleanly and drop the duplicate commit. If you prefer to drop it from #217 right away, happy to force-push — just say the word.
Commit structure (per OCA convention)
The 2
[FIX]cherry-picks from 18.0 retain their original authors (Víctor Martínez @victoralmau, Carlos Lopez @carlos-lopez-tecnativa) per OCA porting-fix convention. The[MIG]commit on top is @tishmen's transformation, amended only to:resource_booking/i18n/*.pofrom 18.0 (Weblate bootstraps faster)cssselecttorequirements.txt(auto-generated byoca-gen-external-dependencies)Differs from #187 by
test-requirements.txtmodification (out-of-scope for single-addon PR)upstream/19.0([19.0][MIG] resource_booking: Migration to 19.0 #187 was 12 commits behind, missing the post-merge updates and setup metapackage bits since landed)Test plan
/ocabot merge nobumpon merge (first port to a new series — no version bump)