Employee Shift Scheduling

hr_schedule
REPOSITORY
REPOSITORYOCA/hr
GIT
GIThttps://github.com/OCA/hr.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/hr/tree/10.0/hr_schedule
VERSION
VERSION 1.0
CATEGORY
CATEGORYGeneric Modules/Human Resources
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Michael Telahun Makonnen <mmakonnen@gmail.com>
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Michael Telahun Makonnen <mmakonnen@gmail.com>
COMMITTERS
COMMITTERSPedro M. Baeza, Iryna Vushnevska
WEBSITE
WEBSITEhttp://miketelahun.wordpress.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:19:57
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/hr:
    - hr_contract_init
    - hr_job_categories
    - hr_security
odoo/odoo:
    - hr_attendance
    - hr
    - base_setup
    - base
    - web_kanban
    - web
    - mail
    - bus
    - web_tour
    - resource
    - report
    - barcodes
    - hr_contract
    - base_action_rule
    - hr_payroll
    - hr_holidays
    - calendar
    - web_calendar
    - product
    - decimal_precision
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES python-dateutil
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
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 data 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 xpath Inherits hr_contract_init.view_contract_init_form
view_contract_init_tree hr.contract.init.tree.schedule hr.contract.init xpath 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 xpath Inherits hr_attendance.view_attendance_form
view_hr_contract_form_inherit hr.contract.form.inherit.schedule hr.contract data 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
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.

REPOSITORY
REPOSITORYOCA/hr
GIT
GIThttps://github.com/OCA/hr.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/hr/tree/9.0/hr_schedule
VERSION
VERSION 1.0
CATEGORY
CATEGORYGeneric Modules/Human Resources
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Michael Telahun Makonnen <mmakonnen@gmail.com>
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Michael Telahun Makonnen <mmakonnen@gmail.com>
COMMITTERS
COMMITTERS
WEBSITE
WEBSITEhttp://miketelahun.wordpress.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:15:21
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/hr:
    - hr_contract_init
    - hr_job_categories
    - hr_security
odoo/odoo:
    - hr_attendance
    - hr
    - base_setup
    - base
    - web_kanban
    - web
    - mail
    - bus
    - resource
    - web_tip
    - report
    - hr_contract
    - base_action_rule
    - hr_payroll
    - hr_holidays
    - calendar
    - web_calendar
    - decimal_precision
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES python-dateutil
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
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 data 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 xpath Inherits hr_contract_init.view_contract_init_form
view_contract_init_tree hr.contract.init.tree.schedule hr.contract.init xpath 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 xpath Inherits hr_attendance.view_attendance_form
view_hr_contract_form_inherit hr.contract.form.inherit.schedule hr.contract data 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
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.

REPOSITORY
REPOSITORYOCA/hr
GIT
GIThttps://github.com/OCA/hr.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/hr/tree/8.0/hr_schedule
VERSION
VERSION 1.0
CATEGORY
CATEGORYGeneric Modules/Human Resources
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Michael Telahun Makonnen <mmakonnen@gmail.com>
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Michael Telahun Makonnen <mmakonnen@gmail.com>
COMMITTERS
COMMITTERSStéphane Bidoul, Pedro M. Baeza
WEBSITE
WEBSITEhttp://miketelahun.wordpress.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:11:23
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/hr:
    - hr_contract_init
    - hr_job_categories
    - hr_security
odoo/odoo:
    - hr_attendance
    - hr
    - base_setup
    - base
    - web_kanban
    - web
    - mail
    - resource
    - board
    - report
    - hr_contract
    - base_action_rule
    - hr_payroll
    - hr_holidays
    - calendar
    - web_calendar
    - decimal_precision
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES python-dateutil
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
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 data 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 xpath Inherits hr_contract_init.view_contract_init_form
view_contract_init_tree hr.contract.init.tree.schedule hr.contract.init xpath 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 xpath Inherits hr_attendance.view_attendance_form
view_hr_contract_form_inherit hr.contract.form.inherit.schedule hr.contract data 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
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.

REPOSITORY
REPOSITORYOCA/hr
GIT
GIThttps://github.com/OCA/hr.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/hr/tree/7.0/hr_schedule
VERSION
VERSION 1.0
CATEGORY
CATEGORYGeneric Modules/Human Resources
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Michael Telahun Makonnen <mmakonnen@gmail.com>
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Michael Telahun Makonnen <mmakonnen@gmail.com>
COMMITTERS
COMMITTERSAlexandre Fayolle, Michael Telahun Makonnen, Sandy Carter, OCA Transbot, dufresnedavid
WEBSITE
WEBSITEhttp://miketelahun.wordpress.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:07:14
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/hr:
    - hr_contract_init
    - hr_job_categories
    - hr_security
    - hr_simplify
    - hr_employee_state
    - hr_contract_state
odoo/odoo:
    - hr_attendance
    - hr
    - base_setup
    - base
    - web_kanban
    - web
    - mail
    - resource
    - process
    - board
    - hr_contract
    - hr_payroll
    - hr_holidays
    - base_calendar
    - base_status
    - base_action_rule
    - decimal_precision
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES python-dateutil
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
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 data 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 xpath Inherits hr_contract_init.view_contract_init_form
view_contract_init_tree hr.contract.init.tree.schedule hr.contract.init xpath 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 xpath Inherits hr_attendance.view_attendance_form
view_hr_contract_form_inherit hr.contract.form.inherit.schedule hr.contract data 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
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.