Employees Shifts

hr_shift
REPOSITORY
REPOSITORYOCA/shift-planning
GIT
GIThttps://github.com/OCA/shift-planning.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/shift-planning/tree/18.0/hr_shift
VERSION
VERSION 1.1.0
CATEGORY
CATEGORYHuman Resources/Shifts
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSPedro M. Baeza, Víctor Martínez, Mathieu Benoit, OCA-git-bot, Abraham Anes, oca-ci, FernandoRomera, David Bañón
WEBSITE
WEBSITEhttps://github.com/OCA/shift-planning
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:20
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - hr
    - base_setup
    - base
    - web
    - digest
    - mail
    - bus
    - web_tour
    - html_editor
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - resource
    - phone_validation
    - resource_mail
    - base_sparse_field
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Shifts to employees with variable work schedules.

Code Analysis

Views touched (19)
XML IDNameModelTypeStatus
hr_employee_form hr.employee field Inherits hr.view_employee_form
res_config_settings_view_form res.config.settings xpath Inherits hr.res_config_settings_view_form
shift_planning_calendar hr.shift.planning calendar New
shift_planning_form hr.shift.planning form New
shift_planning_kanban hr.shift.planning kanban New
shift_planning_line_calendar hr.shift.planning.line calendar New
shift_planning_line_form hr.shift.planning.line form New
shift_planning_line_kanban hr.shift.planning.line kanban New
shift_planning_line_search hr.shift.planning.line search New
shift_planning_line_tree hr.shift.planning.line list New
shift_planning_shift_kanban hr.shift.planning.shift kanban New
shift_planning_shift_kanban_quick_create hr.shift.planning.shift.quick_create hr.shift.planning.shift form New
shift_planning_shift_search hr.shift.planning.shift search New
shift_planning_shift_tree hr.shift.planning.shift list New
shift_planning_tree hr.shift.planning list New
shift_planning_wizard_form shift.planning.wizard form New
shift_template_form hr.shift.template form New
shift_template_search hr.shift.template search New
shift_template_tree hr.shift.template list New
Models touched (10)

New fields (2)
  • current_shift_id Many2one → hr.shift.planning.line
    comodel_name='hr.shift.planning.line' compute='_compute_current_shift_id'
  • shift_planning Boolean
    group_expand='_group_expand_shift_planning' help='Generate shifts for this employee in the shifts plannings'
Public methods (0)

No public methods.

New fields (10)
  • days_data Serialized
    compute='_compute_days_data' default={}
  • end_date Date
    compute='_compute_dates' readonly=True store=True
  • issued_shift_ids One2many → hr.shift.planning.shift
    comodel_name='hr.shift.planning.shift' compute='_compute_issued_shift_ids'
  • issued_shifts_count Integer
    compute='_compute_issued_shift_ids'
  • shift_ids One2many → hr.shift.planning.shift
    comodel_name='hr.shift.planning.shift' inverse_name='planning_id'
  • shifts_count Integer
    compute='_compute_shifts_count'
  • start_date Date
    compute='_compute_dates' inverse='_inverse_start_date' store=True
  • state Selection
    default='new' selection=[('new', 'New'), ('assignment', 'Assignment'), ('planned', 'Planned')]
  • week_number Integer
    required=True
  • year Integer
    required=True
Public methods (7)
  • action_view_day_shifts(self)
  • action_view_issued_shifts(self)
  • action_view_shifts(self)
  • copy_to_planning(self)
  • default_get(self, fields_list)
  • generate_shifts(self)
  • regenerate_shifts(self)

New fields (16)
  • color Integer
    related='template_id.color'
  • day_number Selection
    selection=WEEK_DAYS_SELECTION string='Day'
  • duration_days Float
    compute='_compute_duration' store=True string='Duration (Days)'
  • duration_hours Float
    compute='_compute_duration' store=True string='Duration (Hours)'
  • employee_id Many2one
    related='shift_id.employee_id' store=True
  • end_hour Float
    related='template_id.end_time' string='End hour'
  • end_time Datetime
    compute='_compute_shift_time' store=True
  • planning_id Many2one
    related='shift_id.planning_id'
  • resource_id Many2one
    related='employee_id.resource_id' store=True
  • reviewed Boolean
    help="For unavailable shifts that we don't want to be listed as issued"
  • shift_id Many2one → hr.shift.planning.shift
    comodel_name='hr.shift.planning.shift' ondelete='cascade'
  • start_date Date
    compute='_compute_start_date' string='Date'
  • start_hour Float
    related='template_id.start_time' string='Start hour'
  • start_time Datetime
    compute='_compute_shift_time' store=True
  • state Selection
    compute='_compute_state' readonly=False selection=[('assigned', 'Assigned'), ('on_leave', 'On leave'), ('unassigned', 'Unassigned'), ('holiday', 'Holiday')] store=True
  • template_id Many2one → hr.shift.template
    comodel_name='hr.shift.template' compute='_compute_template_id' group_expand='_group_expand_template_id' readonly=False store=True
Public methods (1)
  • action_unassign_shift(self)

New fields (9)
  • color Integer
    related='template_id.color'
  • employee_id Many2one → hr.employee
    comodel_name='hr.employee' ondelete='cascade'
  • image_128 Image
    related='employee_id.image_128'
  • line_ids One2many → hr.shift.planning.line
    comodel_name='hr.shift.planning.line' inverse_name='shift_id'
  • lines_data Serialized
    compute='_compute_lines_data' default={}
  • planning_id Many2one → hr.shift.planning
    comodel_name='hr.shift.planning' ondelete='cascade'
  • reviewed Boolean
    compute='_compute_reviewed' help="For unavailable shifts that we don't want to be listed as issued" inverse='_inverse_reviewed' readonly=False
  • state Selection
    selection=[('available', 'Fully available'), ('partial', 'Partially available'), ('unavailable', 'Unavailable')]
  • template_id Many2one → hr.shift.template
    comodel_name='hr.shift.template' group_expand='_group_expand_template_id'
Public methods (4)
  • action_toggle_reviewed(self)
  • action_view_shift_details(self)
  • create(self, vals_list)
  • write(self, vals)

New fields (8)
  • active Boolean
    default=True
  • color Integer
  • day_of_week_end Selection
    selection=WEEK_DAYS_SELECTION
  • day_of_week_start Selection
    selection=WEEK_DAYS_SELECTION
  • end_time Float
  • name Char
  • start_time Float
  • tz Selection
    default=<expr> help='This field is used in order to define in which timezone the employees will work.' required=True string='Timezone' args: _tz_get
Public methods (1)
  • create(self, vals_list)
    @api.model_create_multi

New fields (2)
  • shift_end_day Selection
    default='4' selection=WEEK_DAYS_SELECTION
  • shift_start_day Selection
    default='0' selection=WEEK_DAYS_SELECTION
Public methods (0)

No public methods.

New fields (2)
  • shift_end_day Selection
    readonly=False related='company_id.shift_end_day'
  • shift_start_day Selection
    readonly=False related='company_id.shift_start_day'
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 (2)
  • create(self, vals_list)
    @api.model_create_multi
  • unlink(self)

New fields (5)
  • copy_shift_details Boolean
    help='Copy shift planning details. For example, an employee that goes half the week in a shift and the other half in other'
  • from_planning_id Many2one → hr.shift.planning
    comodel_name='hr.shift.planning' compute='_compute_from_planning_id' readonly=False required=True store=True
  • generation_type Selection
    default='from_last' required=True selection=[('from_last', 'Copy from the last planning'), ('from_planning', 'Copy from another planning')]
  • week_number Integer
    help='Generate for this week number' required=True
  • year Integer
    help='Generate for this year' required=True
Public methods (2)
  • default_get(self, fields_list)
    @api.model
  • generate(self)
REPOSITORY
REPOSITORYOCA/shift-planning
GIT
GIThttps://github.com/OCA/shift-planning.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/shift-planning/tree/17.0/hr_shift
VERSION
VERSION 1.1.0
CATEGORY
CATEGORYHuman Resources/Shifts
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSVíctor Martínez, Weblate, OCA-git-bot, Abraham Anes, oca-ci, neitherkx
WEBSITE
WEBSITEhttps://github.com/OCA/shift-planning
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:11
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - hr
    - base_setup
    - base
    - web
    - phone_validation
    - mail
    - bus
    - web_tour
    - resource
    - base_sparse_field
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Shifts to employees with variable work schedules.

Code Analysis

Views touched (18)
XML IDNameModelTypeStatus
hr_employee_form hr.employee field Inherits hr.view_employee_form
res_config_settings_view_form res.config.settings xpath Inherits hr.res_config_settings_view_form
shift_planning_calendar hr.shift.planning calendar New
shift_planning_form hr.shift.planning form New
shift_planning_kanban hr.shift.planning kanban New
shift_planning_line_calendar hr.shift.planning.line calendar New
shift_planning_line_form hr.shift.planning.line form New
shift_planning_line_kanban hr.shift.planning.line kanban New
shift_planning_line_search hr.shift.planning.line search New
shift_planning_line_tree hr.shift.planning.line tree New
shift_planning_shift_kanban hr.shift.planning.shift kanban New
shift_planning_shift_search hr.shift.planning.shift search New
shift_planning_shift_tree hr.shift.planning.shift tree New
shift_planning_tree hr.shift.planning tree New
shift_planning_wizard_form shift.planning.wizard form New
shift_template_form hr.shift.template form New
shift_template_search hr.shift.template search New
shift_template_tree hr.shift.template tree New
Models touched (10)

New fields (2)
  • current_shift_id Many2one → hr.shift.planning.line
    comodel_name='hr.shift.planning.line' compute='_compute_current_shift_id'
  • shift_planning Boolean
    group_expand='_group_expand_shift_planning' help='Generate shifts for this employee in the shifts plannings'
Public methods (0)

No public methods.

New fields (10)
  • days_data Serialized
    compute='_compute_days_data' default={}
  • end_date Date
    compute='_compute_dates' readonly=True store=True
  • issued_shift_ids One2many → hr.shift.planning.shift
    comodel_name='hr.shift.planning.shift' compute='_compute_issued_shift_ids'
  • issued_shifts_count Integer
    compute='_compute_issued_shift_ids'
  • shift_ids One2many → hr.shift.planning.shift
    comodel_name='hr.shift.planning.shift' inverse_name='planning_id'
  • shifts_count Integer
    compute='_compute_shifts_count'
  • start_date Date
    compute='_compute_dates' inverse='_inverse_start_date' store=True
  • state Selection
    default='new' selection=[('new', 'New'), ('assignment', 'Assignment'), ('planned', 'Planned')]
  • week_number Integer
    required=True
  • year Integer
    required=True
Public methods (7)
  • action_view_day_shifts(self)
  • action_view_issued_shifts(self)
  • action_view_shifts(self)
  • copy_to_planning(self)
  • default_get(self, fields_list)
  • generate_shifts(self)
  • regenerate_shifts(self)

New fields (16)
  • color Integer
    related='template_id.color'
  • day_number Selection
    selection=WEEK_DAYS_SELECTION string='Day'
  • duration_days Float
    compute='_compute_duration' store=True string='Duration (Days)'
  • duration_hours Float
    compute='_compute_duration' store=True string='Duration (Hours)'
  • employee_id Many2one
    related='shift_id.employee_id' store=True
  • end_hour Float
    related='template_id.end_time' string='End hour'
  • end_time Datetime
    compute='_compute_shift_time' store=True
  • planning_id Many2one
    related='shift_id.planning_id'
  • resource_id Many2one
    related='employee_id.resource_id' store=True
  • reviewed Boolean
    help="For unavailable shifts that we don't want to be listed as issued"
  • shift_id Many2one → hr.shift.planning.shift
    comodel_name='hr.shift.planning.shift' ondelete='cascade'
  • start_date Date
    compute='_compute_start_date' string='Date'
  • start_hour Float
    related='template_id.start_time' string='Start hour'
  • start_time Datetime
    compute='_compute_shift_time' store=True
  • state Selection
    compute='_compute_state' readonly=False selection=[('assigned', 'Assigned'), ('on_leave', 'On leave'), ('unassigned', 'Unassigned'), ('holiday', 'Holiday')] store=True
  • template_id Many2one → hr.shift.template
    comodel_name='hr.shift.template' compute='_compute_template_id' group_expand='_group_expand_template_id' readonly=False store=True
Public methods (1)
  • action_unassign_shift(self)

New fields (9)
  • color Integer
    related='template_id.color'
  • employee_id Many2one → hr.employee
    comodel_name='hr.employee' ondelete='cascade'
  • image_128 Image
    related='employee_id.image_128'
  • line_ids One2many → hr.shift.planning.line
    comodel_name='hr.shift.planning.line' inverse_name='shift_id'
  • lines_data Serialized
    compute='_compute_lines_data' default={}
  • planning_id Many2one → hr.shift.planning
    comodel_name='hr.shift.planning' ondelete='cascade'
  • reviewed Boolean
    compute='_compute_reviewed' help="For unavailable shifts that we don't want to be listed as issued" inverse='_inverse_reviewed' readonly=False
  • state Selection
    selection=[('available', 'Fully available'), ('partial', 'Partially available'), ('unavailable', 'Unavailable')]
  • template_id Many2one → hr.shift.template
    comodel_name='hr.shift.template' group_expand='_group_expand_template_id'
Public methods (3)
  • action_toggle_reviewed(self)
  • action_view_shift_details(self)
  • write(self, vals)

New fields (8)
  • active Boolean
    default=True
  • color Integer
  • day_of_week_end Selection
    selection=WEEK_DAYS_SELECTION
  • day_of_week_start Selection
    selection=WEEK_DAYS_SELECTION
  • end_time Float
  • name Char
  • start_time Float
  • tz Selection
    default=<expr> help='This field is used in order to define in which timezone the employees will work.' required=True string='Timezone' args: _tz_get
Public methods (1)
  • create(self, vals)
    @api.model

New fields (2)
  • shift_end_day Selection
    default='4' selection=WEEK_DAYS_SELECTION
  • shift_start_day Selection
    default='0' selection=WEEK_DAYS_SELECTION
Public methods (0)

No public methods.

New fields (2)
  • shift_end_day Selection
    readonly=False related='company_id.shift_end_day'
  • shift_start_day Selection
    readonly=False related='company_id.shift_start_day'
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 (2)
  • create(self, vals_list)
    @api.model_create_multi
  • unlink(self)

New fields (5)
  • copy_shift_details Boolean
    help='Copy shift planning details. For example, an employee that goes half the week in a shift and the other half in other'
  • from_planning_id Many2one → hr.shift.planning
    comodel_name='hr.shift.planning' compute='_compute_from_planning_id' readonly=False required=True store=True
  • generation_type Selection
    default='from_last' required=True selection=[('from_last', 'Copy from the last planning'), ('from_planning', 'Copy from another planning')]
  • week_number Integer
    help='Generate for this week number' required=True
  • year Integer
    help='Generate for this year' required=True
Public methods (2)
  • default_get(self, fields_list)
    @api.model
  • generate(self)
REPOSITORY
REPOSITORYOCA/shift-planning
GIT
GIThttps://github.com/OCA/shift-planning.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/shift-planning/tree/15.0/hr_shift
VERSION
VERSION 1.1.2
CATEGORY
CATEGORYHuman Resources/Shifts
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSPedro M. Baeza, Víctor Martínez, Weblate, OCA-git-bot, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/shift-planning
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:00:43
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - hr
    - base_setup
    - base
    - web
    - mail
    - bus
    - web_tour
    - resource
    - base_sparse_field
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Shifts to employees with variable work schedules.

Code Analysis

Views touched (17)
XML IDNameModelTypeStatus
hr_employee_form hr.employee field Inherits hr.view_employee_form
res_config_settings_view_form res.config.settings xpath Inherits hr.res_config_settings_view_form
shift_planning_calendar hr.shift.planning calendar New
shift_planning_form hr.shift.planning form New
shift_planning_kanban hr.shift.planning kanban New
shift_planning_line_calendar hr.shift.planning.line calendar New
shift_planning_line_form hr.shift.planning.line form New
shift_planning_line_kanban hr.shift.planning.line kanban New
shift_planning_line_search hr.shift.planning.line search New
shift_planning_line_tree hr.shift.planning.line tree New
shift_planning_shift_kanban hr.shift.planning.shift kanban New
shift_planning_shift_search hr.shift.planning.shift search New
shift_planning_shift_tree hr.shift.planning.shift tree New
shift_planning_tree hr.shift.planning tree New
shift_planning_wizard_form shift.planning.wizard form New
shift_template_form hr.shift.template form New
shift_template_tree hr.shift.template tree New
Models touched (10)

New fields (2)
  • current_shift_id Many2one → hr.shift.planning.line
    comodel_name='hr.shift.planning.line' compute='_compute_current_shift_id'
  • shift_planning Boolean
    group_expand='_group_expand_shift_planning' help='Generate shifts for this employee in the shifts plannings'
Public methods (0)

No public methods.

New fields (10)
  • days_data Serialized
    compute='_compute_days_data' default={}
  • end_date Date
    compute='_compute_dates' readonly=True store=True
  • issued_shift_ids One2many → hr.shift.planning.shift
    comodel_name='hr.shift.planning.shift' compute='_compute_issued_shift_ids'
  • issued_shifts_count Integer
    compute='_compute_issued_shift_ids'
  • shift_ids One2many → hr.shift.planning.shift
    comodel_name='hr.shift.planning.shift' inverse_name='planning_id'
  • shifts_count Integer
    compute='_compute_shifts_count'
  • start_date Date
    compute='_compute_dates' inverse='_inverse_start_date' store=True
  • state Selection
    default='new' selection=[('new', 'New'), ('assignment', 'Assignment'), ('planned', 'Planned')]
  • week_number Integer
    required=True
  • year Integer
    required=True
Public methods (8)
  • action_view_day_shifts(self)
  • action_view_issued_shifts(self)
  • action_view_shifts(self)
  • copy_to_planning(self)
  • default_get(self, fields_list)
  • generate_shifts(self)
  • name_get(self)
  • regenerate_shifts(self)

New fields (14)
  • color Integer
    related='template_id.color'
  • day_number Selection
    selection=WEEK_DAYS_SELECTION string='Day'
  • employee_id Many2one
    related='shift_id.employee_id' store=True
  • end_hour Float
    related='template_id.end_time' string='End hour'
  • end_time Datetime
    compute='_compute_shift_time' store=True
  • planning_id Many2one
    related='shift_id.planning_id'
  • resource_id Many2one
    related='employee_id.resource_id' store=True
  • reviewed Boolean
    help="For unavailable shifts that we don't want to be listed as issued"
  • shift_id Many2one → hr.shift.planning.shift
    comodel_name='hr.shift.planning.shift' ondelete='cascade'
  • start_date Date
    compute='_compute_start_date' string='Date'
  • start_hour Float
    related='template_id.start_time' string='Start hour'
  • start_time Datetime
    compute='_compute_shift_time' store=True
  • state Selection
    compute='_compute_state' readonly=False selection=[('assigned', 'Assigned'), ('on_leave', 'On leave'), ('unassigned', 'Unassigned'), ('holiday', 'Holiday')] store=True
  • template_id Many2one → hr.shift.template
    comodel_name='hr.shift.template' compute='_compute_template_id' group_expand='_group_expand_template_id' readonly=False store=True
Public methods (2)
  • action_unassign_shift(self)
  • name_get(self)

New fields (9)
  • color Integer
    related='template_id.color'
  • employee_id Many2one → hr.employee
    comodel_name='hr.employee' ondelete='cascade'
  • image_128 Image
    related='employee_id.image_128'
  • line_ids One2many → hr.shift.planning.line
    comodel_name='hr.shift.planning.line' inverse_name='shift_id'
  • lines_data Serialized
    compute='_compute_lines_data' default={}
  • planning_id Many2one → hr.shift.planning
    comodel_name='hr.shift.planning' ondelete='cascade'
  • reviewed Boolean
    compute='_compute_reviewed' help="For unavailable shifts that we don't want to be listed as issued" inverse='_inverse_reviewed' readonly=False
  • state Selection
    selection=[('available', 'Fully available'), ('partial', 'Partially available'), ('unavailable', 'Unavailable')]
  • template_id Many2one → hr.shift.template
    comodel_name='hr.shift.template' group_expand='_group_expand_template_id'
Public methods (3)
  • action_toggle_reviewed(self)
  • action_view_shift_details(self)
  • write(self, vals)

New fields (7)
  • color Integer
  • day_of_week_end Selection
    selection=WEEK_DAYS_SELECTION
  • day_of_week_start Selection
    selection=WEEK_DAYS_SELECTION
  • end_time Float
  • name Char
  • start_time Float
  • tz Selection
    default=<expr> help='This field is used in order to define in which timezone the employees will work.' required=True string='Timezone' args: _tz_get
Public methods (0)

No public methods.

New fields (2)
  • shift_end_day Selection
    default='4' selection=WEEK_DAYS_SELECTION
  • shift_start_day Selection
    default='0' selection=WEEK_DAYS_SELECTION
Public methods (0)

No public methods.

New fields (2)
  • shift_end_day Selection
    readonly=False related='company_id.shift_end_day'
  • shift_start_day Selection
    readonly=False related='company_id.shift_start_day'
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 (2)
  • create(self, vals_list)
    @api.model_create_multi
  • unlink(self)

New fields (5)
  • copy_shift_details Boolean
    help='Copy shift planning details. For example, an employee that goes half the week in a shift and the other half in other'
  • from_planning_id Many2one → hr.shift.planning
    comodel_name='hr.shift.planning' compute='_compute_from_planning_id' readonly=False required=True store=True
  • generation_type Selection
    default='from_last' required=True selection=[('from_last', 'Copy from the last planning'), ('from_planning', 'Copy from another planning')]
  • week_number Integer
    help='Generate for this week number' required=True
  • year Integer
    help='Generate for this year' required=True
Public methods (2)
  • default_get(self, fields_list)
    @api.model
  • generate(self)
REPOSITORY
REPOSITORYOCA/shift-planning
GIT
GIThttps://github.com/OCA/shift-planning.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/shift-planning/tree/14.0/hr_shift
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYHuman Resources/Shifts
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSVíctor Martínez, Weblate, OCA-git-bot, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/shift-planning
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 18:50:18
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - hr
    - base_setup
    - base
    - web
    - mail
    - bus
    - web_tour
    - resource
    - base_sparse_field
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Shifts to employees with variable work schedules.

Code Analysis

Views touched (18)
XML IDNameModelTypeStatus
assets_backend assets_backend ir.ui.view qweb Inherits web.assets_backend
hr_employee_form hr.employee field Inherits hr.view_employee_form
res_config_settings_view_form res.config.settings xpath Inherits hr.res_config_settings_view_form
shift_planning_calendar hr.shift.planning calendar New
shift_planning_form hr.shift.planning form New
shift_planning_kanban hr.shift.planning kanban New
shift_planning_line_calendar hr.shift.planning.line calendar New
shift_planning_line_form hr.shift.planning.line form New
shift_planning_line_kanban hr.shift.planning.line kanban New
shift_planning_line_search hr.shift.planning.line search New
shift_planning_line_tree hr.shift.planning.line tree New
shift_planning_shift_kanban hr.shift.planning.shift kanban New
shift_planning_shift_search hr.shift.planning.shift search New
shift_planning_shift_tree hr.shift.planning.shift tree New
shift_planning_tree hr.shift.planning tree New
shift_planning_wizard_form shift.planning.wizard form New
shift_template_form hr.shift.template form New
shift_template_tree hr.shift.template tree New
Models touched (9)

New fields (2)
  • current_shift_id Many2one → hr.shift.planning.line
    comodel_name='hr.shift.planning.line' compute='_compute_current_shift_id'
  • shift_planning Boolean
    group_expand='_group_expand_shift_planning' help='Generate shifts for this employee in the shifts plannings'
Public methods (0)

No public methods.

New fields (10)
  • days_data Serialized
    compute='_compute_days_data' default={}
  • end_date Date
    compute='_compute_dates' readonly=True store=True
  • issued_shift_ids One2many → hr.shift.planning.shift
    comodel_name='hr.shift.planning.shift' compute='_compute_issued_shift_ids'
  • issued_shifts_count Integer
    compute='_compute_issued_shift_ids'
  • shift_ids One2many → hr.shift.planning.shift
    comodel_name='hr.shift.planning.shift' inverse_name='planning_id'
  • shifts_count Integer
    compute='_compute_shifts_count'
  • start_date Date
    compute='_compute_dates' inverse='_inverse_start_date' store=True
  • state Selection
    default='new' selection=[('new', 'New'), ('assignment', 'Assignment'), ('planned', 'Planned')]
  • week_number Integer
    required=True
  • year Integer
    required=True
Public methods (8)
  • action_view_day_shifts(self)
  • action_view_issued_shifts(self)
  • action_view_shifts(self)
  • copy_to_planning(self)
  • default_get(self, fields_list)
  • generate_shifts(self)
  • name_get(self)
  • regenerate_shifts(self)

New fields (14)
  • color Integer
    related='template_id.color'
  • day_number Selection
    selection=WEEK_DAYS_SELECTION string='Day'
  • employee_id Many2one
    related='shift_id.employee_id'
  • end_hour Float
    related='template_id.end_time' string='End hour'
  • end_time Datetime
    compute='_compute_shift_time' store=True
  • planning_id Many2one
    related='shift_id.planning_id'
  • resource_id Many2one
    related='employee_id.resource_id' store=True
  • reviewed Boolean
    help="For unavailable shifts that we don't want to be listed as issued"
  • shift_id Many2one → hr.shift.planning.shift
    comodel_name='hr.shift.planning.shift' ondelete='cascade'
  • start_date Date
    compute='_compute_start_date' string='Date'
  • start_hour Float
    related='template_id.start_time' string='Start hour'
  • start_time Datetime
    compute='_compute_shift_time' store=True
  • state Selection
    compute='_compute_state' readonly=False selection=[('assigned', 'Assigned'), ('on_leave', 'On leave'), ('unassigned', 'Unassigned'), ('holiday', 'Holiday')] store=True
  • template_id Many2one → hr.shift.template
    comodel_name='hr.shift.template' compute='_compute_template_id' group_expand='_group_expand_template_id' readonly=False store=True
Public methods (2)
  • action_unassign_shift(self)
  • name_get(self)

New fields (9)
  • color Integer
    related='template_id.color'
  • employee_id Many2one → hr.employee
    comodel_name='hr.employee' ondelete='cascade'
  • image_128 Image
    related='employee_id.image_128'
  • line_ids One2many → hr.shift.planning.line
    comodel_name='hr.shift.planning.line' inverse_name='shift_id'
  • lines_data Serialized
    compute='_compute_lines_data' default={}
  • planning_id Many2one → hr.shift.planning
    comodel_name='hr.shift.planning' ondelete='cascade'
  • reviewed Boolean
    compute='_compute_reviewed' help="For unavailable shifts that we don't want to be listed as issued" inverse='_inverse_reviewed' readonly=False
  • state Selection
    selection=[('available', 'Fully available'), ('partial', 'Partially available'), ('unavailable', 'Unavailable')]
  • template_id Many2one → hr.shift.template
    comodel_name='hr.shift.template' group_expand='_group_expand_template_id'
Public methods (3)
  • action_toggle_reviewed(self)
  • action_view_shift_details(self)
  • write(self, vals)

New fields (7)
  • color Integer
  • day_of_week_end Selection
    selection=WEEK_DAYS_SELECTION
  • day_of_week_start Selection
    selection=WEEK_DAYS_SELECTION
  • end_time Float
  • name Char
  • start_time Float
  • tz Selection
    default=<expr> help='This field is used in order to define in which timezone the employees will work.' required=True string='Timezone' args: _tz_get
Public methods (0)

No public methods.

New fields (2)
  • shift_end_day Selection
    default='4' selection=WEEK_DAYS_SELECTION
  • shift_start_day Selection
    default='0' selection=WEEK_DAYS_SELECTION
Public methods (0)

No public methods.

New fields (2)
  • shift_end_day Selection
    readonly=False related='company_id.shift_end_day'
  • shift_start_day Selection
    readonly=False related='company_id.shift_start_day'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (4)
  • from_planning_id Many2one → hr.shift.planning
    comodel_name='hr.shift.planning' compute='_compute_from_planning_id' readonly=False required=True store=True
  • generation_type Selection
    default='from_last' required=True selection=[('from_last', 'Copy from the last planning'), ('from_planning', 'Copy from another planning')]
  • week_number Integer
    help='Generate for this week number' required=True
  • year Integer
    help='Generate for this year' required=True
Public methods (2)
  • default_get(self, fields_list)
    @api.model
  • generate(self)
STATUS
STATUSOpen migration PR - not merged yet for this version
REPOSITORY
REPOSITORYOCA/shift-planning
PULL REQUEST
PULL REQUEST16.0 mig hr shift (#35)