Repository
OCA/shift-planning · module folder · Try on Runboat
Module version
1.1.2
Category
Human Resources/Shifts
Folder size
0.63 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/shift-planning
Last tracking update
2026-08-11 17:15:20
Authors
Odoo Community Association (OCA), Tecnativa
Maintainers
Odoo Community Association (OCA), Tecnativa
Committers
Pedro M. Baeza, Víctor Martínez, Cyril VINH-TUNG, Weblate, FernandoRomera, Mathieu Benoit, OCA-git-bot, Abraham Anes, oca-ci, David Bañón
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
hr_shift_holidays_public
Description
Shifts to employees with variable work schedules.

Code Analysis

Views touched (19)
XML IDNameModelTypeStatus
hr_employee_form hr.employee form Inherits hr.view_employee_form
res_config_settings_view_form res.config.settings form 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
HTTP endpoints (0)

No HTTP endpoints found for this module.

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)

Loading…

Loading…

Loading…

Status
Open migration PR — not merged yet for this version
CI status
checks failing
Open since
123 days ago
Last activity
122 days ago
Repository
OCA/shift-planning
Pull request
16.0 mig hr shift (#35)
Status
Open migration PR — not merged yet for this version
CI status
green — ready to merge
Open since
43 days ago
Last activity
29 days ago
Repository
OCA/shift-planning
Pull request
[19.0][MIG] hr_shift: Migration to 19.0 (#38)