-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] hr{,_contract,_holidays}: default to company calendar
Versions -------- - 17.0+ Steps ----- 1. Go to Employees app as admin; 2. clear the "Working Hours" field & save; 3. go to Time Off app. Issue ----- Odoo Server Error. Cause ----- Commit 8f87e10 added the `_get_consumed_leaves` method to `hr.employee`, which calls on `resource.calendar` methods with `ensure_one()` active. The `resource_calendar_id` is not a required field for employees, so an error occurs when these methods are called on an empty record. Solution -------- Default to `company_id.resource_calendar_id` where a calendar is expected. Also fixes a potential issue in `hr_contract` when getting attendances between a time interval that includes multiple contracts using different calendars. opw-3665412 closes odoo#149908 Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
- Loading branch information
Showing
5 changed files
with
63 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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