odoo/industry#2214
Created by fw-bot
- label
- odoo-dev:saas-19.3-19.0-booking-engine-test-fix-chga-529117-fw
- head
- 5d138dd1cde711f1632e32483ce6db19fc81de50
- merged
- 3 weeks ago by Industry, Vallaeys Valentin (vava)
| odoo/industry | |
|---|---|
| 19.0 | #2182 |
| saas-19.1 | #2210 |
| saas-19.2 | #2213 |
| saas-19.3 | #2214 |
| master | #2215 |
[FIX] test_booking_engine: assign calendar to overbooking test resource
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.
Forward-Port-Of: #2182