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 IDNameModelTypeStatus
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…