[FIX] test_booking_engine: assign calendar to overbooking test resource#2210
Closed
fw-bot wants to merge 1 commit into
Closed
[FIX] test_booking_engine: assign calendar to overbooking test resource#2210fw-bot wants to merge 1 commit into
fw-bot wants to merge 1 commit into
Conversation
Before PR: The test resource was created without an explicit calendar assignment. As a result, the default `Standard 40 hours/week` calendar was automatically assigned, making the resource available only from Monday to Friday. Also, the rental start date is set as `today + 1` here [1] Because of this, when the test runs on Friday, the start date becomes Saturday. Since the resource is unavailable on weekends, the test fails with a 'resource not available' error. link[1]: https://github.com/odoo/industry/blob/d442610935aa38adcf7b735cdd6e0dab1154c746/tests/test_booking_engine/tests/test_overbooking.py#L47-L48 After PR: Explicitly assign calendar_id as False to the test resource. Since this calendar keeps the resource available on all days of the week, the test no longer depends on the weekday it runs on. X-original-commit: 06ac86b
Collaborator
Author
|
This PR targets saas-19.1 and is part of the forward-port chain. Further PRs will be created up to master. More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port |
Author
|
@chga-odoo @vava-odoo ci/industry failed on this forward-port PR |
Collaborator
robodoo
pushed a commit
that referenced
this pull request
May 22, 2026
Before PR: The test resource was created without an explicit calendar assignment. As a result, the default `Standard 40 hours/week` calendar was automatically assigned, making the resource available only from Monday to Friday. Also, the rental start date is set as `today + 1` here [1] Because of this, when the test runs on Friday, the start date becomes Saturday. Since the resource is unavailable on weekends, the test fails with a 'resource not available' error. link[1]: https://github.com/odoo/industry/blob/d442610935aa38adcf7b735cdd6e0dab1154c746/tests/test_booking_engine/tests/test_overbooking.py#L47-L48 After PR: Explicitly assign calendar_id as False to the test resource. Since this calendar keeps the resource available on all days of the week, the test no longer depends on the weekday it runs on. closes #2210 X-original-commit: 06ac86b Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
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.

Before PR:The test resource was created without an explicit calendar assignment. As a result, the default
Standard 40 hours/weekcalendar was automatically assigned, making the resource available only from Monday to Friday.Also, the rental start date is set as
today + 1here [1] Because of this, when the test runs on Friday, the start date becomes Saturday. Since the resource is unavailable on weekends, the test fails with a 'resource not available' error. link[1]:industry/tests/test_booking_engine/tests/test_overbooking.py
Lines 47 to 48 in d442610
After PR:Explicitly assign calendar_id as False to the test resource. Since this calendar keeps the resource available on all days of the week, the test no longer depends on the weekday it runs on.
Forward-Port-Of: #2182