Employee Shift Scheduling
hr_schedule · OCA/hr
-
Security25/25No findings
-
Activity0/25Last human commit 93 months ago
-
Required by5/250 modules depend on it
-
Maturity25/25In 4 Odoo series since 7.0
Heuristic over the facts below, not an audit · How it's computed
Migration considerations
- Migrating to 11.0: the workflow engine (`trg_validate`) was removed: rewrite as state-field transitions. (3 occurrences in this file) migration-workflow-call · source
- Migrating to 11.0: the workflow engine (`trg_validate`) was removed: rewrite as state-field transitions. migration-workflow-call · 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 · 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_schedule_alert— Migrating to 19.0: `_sql_constraints` is ignored and its constraints are silently not created: declare `models.Constraint` attributes instead. (2 occurrences in this file) migration-sql-constraints · 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=`. (2 occurrences in this file) migration-old-style-fields · sourcemass_schedule_cron— Migrating to 18.0: `ir.cron` lost `numbercall`/`doall`: remove them from the record, data loading fails on unknown fields. (2 occurrences in this file) migration-cron-numbercall · 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=`. (2 occurrences in this file) migration-old-style-fields · sourceview_hr_schedule_form— Migrating to 17.0: `attrs=`/`states=` are rejected in views: convert them to Python expressions in `invisible`/`readonly`/`required`, keeping the original AND/OR logic. (2 occurrences in this file) migration-view-attrs-states · sourceview_hr_schedule_tree— Migrating to 18.0: the `tree` view type was renamed to `list` (`<list>` roots, `view_mode`). (7 occurrences in this file) migration-view-tree-tag · sourceview_restday_change_wizard— Migrating to 17.0: `attrs=`/`states=` are rejected in views: convert them to Python expressions in `invisible`/`readonly`/`required`, keeping 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. (13 occurrences in this file) 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=`. (19 occurrences in this file) migration-old-style-fields · source- Since 10.0: the `openerp` namespace was renamed to `odoo`; only a deprecated `openerp.addons` alias remained. (`openerp`) (5 occurrences in this file) migration-openerp-import · source
- Since 10.0: the `openerp` namespace was renamed to `odoo`; only a deprecated `openerp.addons` alias remained. (`openerp`) (2 occurrences in this file) migration-openerp-import · source
- Since 10.0: the `openerp` namespace was renamed to `odoo`; only a deprecated `openerp.addons` alias remained. (`openerp.osv`) (4 occurrences in this file) migration-openerp-import · source
- Since 10.0: the `openerp` namespace was renamed to `odoo`; only a deprecated `openerp.addons` alias remained. (`openerp.osv`) migration-openerp-import · source
- Since 10.0: the `openerp` namespace was renamed to `odoo`; only a deprecated `openerp.addons` alias remained. (`openerp.osv`) migration-openerp-import · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
Employee Shift Scheduling
Easily create, manage, and track employee schedules.
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
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
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)
No new fields.
Public methods (0)No public methods.
No new fields.
Public methods (0)No public methods.
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)
No new fields.
Public methods (2)-
holidays_refuse(self, cr, uid, ids, context=None) -
holidays_validate(self, cr, uid, ids, context=None)
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)
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)
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.
No new fields.
Public methods (1)-
generate_alerts(self, cr, uid, ids, context=None)
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.
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)
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)
No new fields.
Public methods (0)No public methods.
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.
No new fields.
Public methods (0)No public methods.
No new fields.
Public methods (2)-
do_validate(self, cr, uid, ids, context=None) -
view_schedules(self, cr, uid, ids, context=None)
No new fields.
Public methods (0)No public methods.
Loading…
Loading…
Loading…