odoo/industry#2182

Created by Chirag Tribhovanbhai Gami (chga)
Merged at 06ac86bd20a58c0de04cd4e53bf6a03ea1a9b5a2

Statuses:

label
odoo-dev:19.0-booking-engine-test-fix-chga
head
ea5aee3dbf4ec7c2e14682be7bda8b0f34dd9c79
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.