TIP: You can type at any time to perform a new search.
Employee Shift Scheduling
hr_schedule · OCA/hr
Security findings
Migration considerations
- Imports from the old `openerp` namespace: renamed to `odoo` since Odoo 10.0. migration-openerp-import · source
- Imports from the old `openerp.osv` namespace: renamed to `odoo` since Odoo 10.0. migration-openerp-import · source
- Imports from the old `openerp.tools` namespace: renamed to `odoo` since Odoo 10.0. migration-openerp-import · source
- Imports from the old `openerp.tools` namespace: renamed to `odoo` since Odoo 10.0. migration-openerp-import · source
- Imports from the old `openerp.tools.translate` namespace: renamed to `odoo` since Odoo 10.0. migration-openerp-import · source
- Uses the old workflow engine (base.workflow / `trg_validate`): removed in Odoo 11.0, must be rewritten as state-field transitions. migration-workflow · source
- Uses the old workflow engine (base.workflow / `trg_validate`): removed in Odoo 11.0, must be rewritten as state-field transitions. migration-workflow · source
- Uses the old workflow engine (base.workflow / `trg_validate`): removed in Odoo 11.0, must be rewritten as state-field transitions. migration-workflow · source
- Imports from the old `openerp` namespace: renamed to `odoo` since Odoo 10.0. migration-openerp-import · source
- Imports from the old `openerp.osv` namespace: renamed to `odoo` since Odoo 10.0. migration-openerp-import · source
- Uses the old workflow engine (base.workflow / `trg_validate`): removed in Odoo 11.0, must be rewritten as state-field transitions. migration-workflow · source
- Imports from the old `openerp.osv` namespace: renamed to `odoo` since Odoo 10.0. migration-openerp-import · source
- Imports from the old `openerp.tools` namespace: renamed to `odoo` since Odoo 10.0. migration-openerp-import · source
- Imports from the old `openerp.tools` namespace: renamed to `odoo` since Odoo 10.0. migration-openerp-import · source
- Imports from the old `openerp.tools.translate` namespace: renamed to `odoo` since Odoo 10.0. migration-openerp-import · source
- Imports from the old `openerp.osv` namespace: renamed to `odoo` since Odoo 10.0. migration-openerp-import · source
- Imports from the old `openerp.osv` namespace: renamed to `odoo` since Odoo 10.0. migration-openerp-import · source
compute_alerts— Class 'compute_alerts' still inherits from the old-style `orm.TransientModel` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourcecompute_alerts— Class 'compute_alerts' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourcecontract_init— Class 'contract_init' still inherits from the old-style `orm.Model` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourcecontract_init— Class 'contract_init' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourcedepartment_selection— Class 'department_selection' still inherits from the old-style `orm.TransientModel` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourcedepartment_selection— Class 'department_selection' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourcehr_attendance— Class 'hr_attendance' still inherits from the old-style `orm.Model` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourcehr_attendance— Class 'hr_attendance' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourcehr_contract— Class 'hr_contract' still inherits from the old-style `orm.Model` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourcehr_contract— Class 'hr_contract' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourcehr_contract— Class 'hr_contract' declares `_defaults` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourcehr_holidays— Class 'hr_holidays' still inherits from the old-style `orm.Model` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourcehr_schedule— Class 'hr_schedule' still inherits from the old-style `orm.Model` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourcehr_schedule— Class 'hr_schedule' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourcehr_schedule— Class 'hr_schedule' declares `_defaults` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourcehr_schedule_alert— Class 'hr_schedule_alert' still inherits from the old-style `orm.Model` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourcehr_schedule_alert— Class 'hr_schedule_alert' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourcehr_schedule_alert— Class 'hr_schedule_alert' declares `_defaults` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourcehr_schedule_alert_rule— Class 'hr_schedule_alert_rule' still inherits from the old-style `orm.Model` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourcehr_schedule_alert_rule— Class 'hr_schedule_alert_rule' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourcehr_schedule_alert_rule— Class 'hr_schedule_alert_rule' declares `_defaults` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourcehr_schedule_generate— Class 'hr_schedule_generate' still inherits from the old-style `orm.TransientModel` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourcehr_schedule_generate— Class 'hr_schedule_generate' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourcehr_schedule_generate— Class 'hr_schedule_generate' declares `_defaults` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourcehr_schedule_request— Class 'hr_schedule_request' still inherits from the old-style `orm.Model` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourcehr_schedule_request— Class 'hr_schedule_request' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourcehr_schedule_request— Class 'hr_schedule_request' declares `_defaults` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourcehr_schedule_template— Class 'hr_schedule_template' still inherits from the old-style `orm.Model` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourcehr_schedule_template— Class 'hr_schedule_template' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourcehr_schedule_template— Class 'hr_schedule_template' declares `_defaults` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourcehr_schedule_working_times— Class 'hr_schedule_working_times' still inherits from the old-style `orm.Model` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourcehr_schedule_working_times— Class 'hr_schedule_working_times' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourcehr_schedule_working_times— Class 'hr_schedule_working_times' declares `_defaults` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourcehr_term— Class 'hr_term' still inherits from the old-style `orm.Model` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourcerestday— Class 'restday' still inherits from the old-style `orm.TransientModel` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourcerestday— Class 'restday' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourcerestday— Class 'restday' declares `_defaults` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourceschedule_detail— Class 'schedule_detail' still inherits from the old-style `orm.Model` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourceschedule_detail— Class 'schedule_detail' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourceschedule_detail— Class 'schedule_detail' declares `_defaults` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourceview_hr_schedule_form— For a target of Odoo 17.0+: view 'view_hr_schedule_form' uses `attrs=`/`states=`, which are no longer supported. Convert modifiers to direct Python boolean expressions in `invisible`/`readonly`/`required`; preserve the original AND/OR logic. migration-view-attrs-states · sourceview_restday_change_wizard— For a target of Odoo 17.0+: view 'view_restday_change_wizard' uses `attrs=`/`states=`, which are no longer supported. Convert modifiers to direct Python boolean expressions in `invisible`/`readonly`/`required`; preserve the original AND/OR logic. migration-view-attrs-states · sourceview_schedule_detail_form— For a target of Odoo 17.0+: view 'view_schedule_detail_form' uses `attrs=`/`states=`, which are no longer supported. Convert modifiers to direct Python boolean expressions in `invisible`/`readonly`/`required`; preserve the original AND/OR logic. migration-view-attrs-states · sourceweek_days— Class 'week_days' still inherits from the old-style `orm.Model` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourceweek_days— Class 'week_days' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourceview_alert_rule_tree— View 'view_alert_rule_tree' is defined with a `<tree>` root tag: renamed to `<list>` in Odoo 18.0. migration-view-tree-tag · sourceview_alert_tree— View 'view_alert_tree' is defined with a `<tree>` root tag: renamed to `<list>` in Odoo 18.0. migration-view-tree-tag · sourceview_hr_schedule_template_tree— View 'view_hr_schedule_template_tree' is defined with a `<tree>` root tag: renamed to `<list>` in Odoo 18.0. migration-view-tree-tag · sourceview_hr_schedule_template_worktime_tree— View 'view_hr_schedule_template_worktime_tree' is defined with a `<tree>` root tag: renamed to `<list>` in Odoo 18.0. migration-view-tree-tag · sourceview_hr_schedule_tree— View 'view_hr_schedule_tree' is defined with a `<tree>` root tag: renamed to `<list>` in Odoo 18.0. migration-view-tree-tag · sourceview_request_tree— View 'view_request_tree' is defined with a `<tree>` root tag: renamed to `<list>` in Odoo 18.0. migration-view-tree-tag · sourceview_schedule_detail_tree— View 'view_schedule_detail_tree' is defined with a `<tree>` root tag: renamed to `<list>` in Odoo 18.0. migration-view-tree-tag · source
Migration review checklist, not a compatibility verdict. No target version is selected: apply version-specific advice only when migrating to that version or later.
- Repository
- OCA/hr · module folder · Try on Runboat
- Module version
- 1.0
- Category
- Generic Modules/Human Resources
- Folder size
- 0.15 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- http://miketelahun.wordpress.com
- Last tracking update
- 2026-08-07 07:17:50
- Authors
- Michael Telahun Makonnen <mmakonnen@gmail.com>, Odoo Community Association (OCA)
- Maintainers
- Michael Telahun Makonnen <mmakonnen@gmail.com>, Odoo Community Association (OCA)
- Committers
- Pedro M. Baeza, Iryna Vushnevska
- Odoo dependencies
- Python dependencies
- python-dateutil
- System dependencies
- None
- Required by
- None
- Description
Employee Shift Scheduling ========================= Easily create, manage, and track employee schedules.
Code Analysis
Views touched (28)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
hr_employee_view_form |
hr.employee.view.inherit.schedule | hr.employee | form | Inherits hr.view_employee_form |
view_alert_employee_selection |
hr.schedule.alert.compute.view | hr.schedule.alert.compute | form | New |
view_alert_filter |
hr.schedule.alert.filter | hr.schedule.alert | search | New |
view_alert_form |
hr.schedule.alert.form | hr.schedule.alert | form | New |
view_alert_rule_form |
hr.schedule.alert.rule.form | hr.schedule.alert.rule | form | New |
view_alert_rule_tree |
hr.schedule.alert.rule.tree | hr.schedule.alert.rule | tree | New |
view_alert_tree |
hr.schedule.alert.tree | hr.schedule.alert | tree | New |
view_contract_init_form |
hr.contract.init.form.schedule | hr.contract.init | form | Inherits hr_contract_init.view_contract_init_form |
view_contract_init_tree |
hr.contract.init.tree.schedule | hr.contract.init | tree | Inherits hr_contract_init.view_contract_init_tree |
view_department_selection |
hr.schedule.validate.departments.view | hr.schedule.validate.departments | form | New |
view_hr_attendance_form |
hr.attendance.form.inherit.schedule | hr.attendance | form | Inherits hr_attendance.view_attendance_form |
view_hr_contract_form_inherit |
hr.contract.form.inherit.schedule | hr.contract | form | Inherits hr_contract.hr_contract_view_form |
view_hr_schedule_detail_filter |
view_hr_schedule_detail_filter | hr.schedule.detail | search | New |
view_hr_schedule_filter |
view_hr_schedule_filter | hr.schedule | search | New |
view_hr_schedule_form |
hr.schedule.form | hr.schedule | form | New |
view_hr_schedule_template_form |
hr.schedule.template.form | hr.schedule.template | form | New |
view_hr_schedule_template_tree |
hr.schedule.template.tree | hr.schedule.template | tree | New |
view_hr_schedule_template_worktime_form |
hr.schedule.template.worktime.form | hr.schedule.template.worktime | form | New |
view_hr_schedule_template_worktime_tree |
hr.schedule.template.worktime.tree | hr.schedule.template.worktime | tree | New |
view_hr_schedule_tree |
hr.schedule.tree | hr.schedule | tree | New |
view_request_form |
hr.schedule.request.form | hr.schedule.request | form | New |
view_request_tree |
hr.schedule.request.tree | hr.schedule.request | tree | New |
view_restday_change_wizard |
hr.restday.wizard.form | hr.restday.wizard | form | New |
view_schedule_alert_calendar |
hr.schedule.alert.calendar | hr.schedule.alert | calendar | New |
view_schedule_detail_calendar |
hr.schedule.detail.calendar | hr.schedule.detail | calendar | New |
view_schedule_detail_form |
hr.schedule.detail.form | hr.schedule.detail | form | New |
view_schedule_detail_tree |
hr.schedule.detail.tree | hr.schedule.detail | tree | New |
view_schedule_employee_selection |
hr.schedule.generate.view | hr.schedule.generate | form | New |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (17)
New fields (0)
No new fields.
Public methods (3)-
create(self, cr, uid, vals, context=None) -
unlink(self, cr, uid, ids, context=None) -
write(self, cr, uid, ids, vals, context=None)
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (0)
No new fields.
Public methods (3)-
create(self, cr, uid, vals, context=None) -
state_cancel(self, cr, uid, ids, context=None) -
unlink(self, cr, uid, ids, context=None)
New fields (0)
No new fields.
Public methods (2)-
holidays_refuse(self, cr, uid, ids, context=None) -
holidays_validate(self, cr, uid, ids, context=None)
New fields (0)
No new fields.
Public methods (4)-
change_restday(self, cr, uid, ids, context=None) -
onchange_employee(self, cr, uid, ids, ee_id, context=None) -
onchange_temp_week(self, cr, uid, ids, newdate) -
onchange_week(self, cr, uid, ids, newdate)
New fields (0)
No new fields.
Public methods (14)-
add_restdays(self, cr, uid, schedule, field_name, rest_days=None, context=None) -
create(self, cr, uid, vals, context=None) -
create_details(self, cr, uid, sched_id, context=None) -
create_mass_schedule(self, cr, uid, context=None)Creates tentative schedules for all employees based on the schedule template attached to their contract. Called from the scheduler. -
deletable(self, cr, uid, sched_id, context=None) -
delete_details(self, cr, uid, sched_id, context=None) -
details_locked(self, cr, uid, ids, context=None) -
get_rest_days(self, cr, uid, employee_id, dt, context=None)If the rest day(s) have been explicitly specified that's what is returned, otherwise a guess is returned based on the week days that are not scheduled. If an explicit rest day(s) has not been specified an empty list is returned. If it is able to figure out the rest days it will return a list of week day integers with Monday being 0. -
get_rest_days_by_id(self, cr, uid, Id, week_start, context=None)If the rest day(s) have been explicitly specified that's what is returned, otherwise a guess is returned based on the week days that are not scheduled. If an explicit rest day(s) has not been specified an empty list is returned. If it is able to figure out the rest days it will return a list of week day integers with Monday being 0. -
onchange_employee_start_date(self, cr, uid, ids, employee_id, date_start, context=None) -
unlink(self, cr, uid, ids, context=None) -
workflow_lock(self, cr, uid, ids, context=None)Lock the Schedule Record. Expects to be called by its schedule detail records as they are locked one by one. When the last one has been locked the schedule will also be locked. -
workflow_unlock(self, cr, uid, ids, context=None)Unlock the Schedule Record. Expects to be called by its schedule detail records as they are unlocked one by one. When the first one has been unlocked the schedule will also be unlocked. -
workflow_validate(self, cr, uid, ids, context=None)
New fields (0)
No new fields.
Public methods (2)-
check_for_alerts(self, cr, uid, context=None)Check the schedule detail and attendance records for yesterday against the scheduling/attendance alert rules. If any rules match create a record in the database. -
compute_alerts_by_employee(self, cr, uid, employee_id, strDay, context=None)Compute alerts for employee on specified day.
New fields (0)
No new fields.
Public methods (1)-
generate_alerts(self, cr, uid, ids, context=None)
New fields (0)
No new fields.
Public methods (1)-
check_rule(self, cr, uid, rule, sched_details, punches, context=None)Identify if the schedule detail or attendance records trigger any rule. If they do return the datetime and id of the record that triggered it in one of the appropriate lists. All schedule detail and attendance records are expected to be in sorted order according to datetime.
New fields (0)
No new fields.
Public methods (9)-
create(self, cr, uid, vals, context=None) -
scheduled_begin_end_times(self, cr, uid, employee_id, contract_id, dt, context=None)Returns a list of tuples containing shift start and end times for the day -
scheduled_begin_end_times_range(self, cr, uid, employee_id, contract_id, dStart, dEnd, context=None)Returns a dictionary with the dates in range dtStart - dtEnd as keys and a list of tuples containing shift start and end times during those days as values -
scheduled_hours_on_day(self, cr, uid, employee_id, contract_id, dt, context=None) -
scheduled_hours_on_day_from_range(self, d, range_dict) -
unlink(self, cr, uid, ids, context=None) -
workflow_lock(self, cr, uid, ids, context=None) -
workflow_unlock(self, cr, uid, ids, context=None) -
write(self, cr, uid, ids, vals, context=None)
New fields (0)
No new fields.
Public methods (2)-
generate_schedules(self, cr, uid, ids, context=None) -
onchange_start_date(self, cr, uid, ids, date_start, context=None)
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (0)
No new fields.
Public methods (2)-
get_hours_by_weekday(self, cr, uid, tpl_id, day_no, context=None)Return the number working hours in the template for day_no. For day_no 0 is Monday. -
get_rest_days(self, cr, uid, t_id, context=None)If the rest day(s) have been explicitly specified that's what is returned, otherwise a guess is returned based on the week days that are not scheduled. If an explicit rest day(s) has not been specified an empty list is returned. If it is able to figure out the rest days it will return a list of week day integers with Monday being 0.
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (0)
No new fields.
Public methods (2)-
do_validate(self, cr, uid, ids, context=None) -
view_schedules(self, cr, uid, ids, context=None)
New fields (0)
No new fields.
Public methods (0)No public methods.
Loading…
Loading…
Loading…