Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
74a4a19
[ADD] hr_shift: New module
chienandalu Sep 26, 2024
d059011
[MIG] hr_shift: Migration to 15.0
chienandalu Jan 13, 2025
86ab5c4
[IMP] hr_shift: My shift improvements
victoralmau Jun 25, 2025
0168f7d
[IMP] hr_shift: pre-commit auto fixes
Abranes Aug 8, 2025
9fbe9ac
[17.0][MIG] hr_shift: Migration to 17.0
Abranes Aug 28, 2025
dd0cbd1
Added translation using Weblate (Italian)
mymage Sep 1, 2025
e9d4166
[FIX] hr_shift: Allow assigning shifts with leaves/public holidays to…
victoralmau Sep 8, 2025
4b723f3
[FIX] hr_shift: prevent shift planning being counted as lunch
Neitherkx Sep 12, 2025
1510672
[IMP] hr_shift: pre-commit auto fixes
Abranes Aug 31, 2025
c2d59ed
[18.0][MIG] hr_shift: Migration to 18.0
Abranes Aug 31, 2025
80b6091
[MIG] hr_shift: Continue migration to 18.0
david-banon-tecnativa Jan 29, 2026
793a17f
[UPD] Update hr_shift.pot
Feb 3, 2026
e6a460d
[BOT] post-merge updates
OCA-git-bot Feb 3, 2026
1355b3b
[FIX] hr_shift: reduce crash when missing data
mathben Jan 30, 2026
fca1d47
[FIX] hr_shift: typo self
mathben Feb 4, 2026
20e2a63
[BOT] post-merge updates
OCA-git-bot Feb 10, 2026
05ae533
[FIX] hr_shift: Replace calendar attendances by date
pedrobaeza Feb 19, 2026
009a494
[BOT] post-merge updates
OCA-git-bot Feb 19, 2026
c7ead82
[18.0][IMP] hr_shift: new icon
FernandoRomera Feb 21, 2026
d558ad9
[BOT] post-merge updates
OCA-git-bot Feb 23, 2026
cd72119
[IMP] hr_shift: add active to shift templates
Abranes Apr 16, 2026
a4f4cd6
[BOT] post-merge updates
OCA-git-bot Apr 23, 2026
2577b42
[MIG] hr_shift: Migration to 19.0
XtremXpert Jul 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
211 changes: 211 additions & 0 deletions hr_shift/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

================
Employees Shifts
================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:0ffdae306e236797538cad5cb90d77ed7deb310317c9ab739bc6219aff1d3d54
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fshift--planning-lightgray.png?logo=github
:target: https://github.com/OCA/shift-planning/tree/19.0/hr_shift
:alt: OCA/shift-planning
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/shift-planning-19-0/shift-planning-19-0-hr_shift
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/shift-planning&target_branch=19.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Shifts to employees with variable work schedules.

**Table of contents**

.. contents::
:local:

Configuration
=============

In order to configure and create shift plannings you'll need to be in
the **Shift Manager** security group.

Creating shifts
---------------

Go to *Shifts > Shifts* and create a new one. Define a name, a color (it
will be used in the shifts assignment cards), a start and end time, a
time zone and week days span.

Create as many as you need to.

Setting employees with variable shifts.
---------------------------------------

Go to *Employees > Employees* and in the tab *Work information* go to
the *Schedule* section. There you can set the **Shift planning**
checkbox if this employee should have a shift generated automatically in
the weekly plannings.

Setting the default work week
-----------------------------

Go to *Settings > Employees* and in the *Work organization* section you
can define the default working week for your company. By default it goes
from Monday to Friday.

Usage
=====

After configuring the application we can start making plannings. To
create a new one:

1. Go to *Shifts > Plannings* and click on *Create*.
2. Set the year and week number for the planning and click *Save*.
3. Now click on *Generate* to pre-create the shifts assignments for your
employees.

You can start assigning shifts click on the *Shifts* smart button where
you'll go to a kanban view with a card per employee that you can drag
into the corresponding shift. Once you do it, you'll the color of the
week days in the card changes to the color of the shift assigned.

.. image:: https://raw.githubusercontent.com/OCA/shift-planning/19.0/hr_shift/static/description/assignment_dragging.gif
:alt: Drag to assign

Now if you want to assign a different shift for a specific day of that
week to that employee, you can do so clicking on **Shift details**. In
the detailed kanban view drag the days to their corresponding shifts.

.. image:: https://raw.githubusercontent.com/OCA/shift-planning/19.0/hr_shift/static/description/assignment_details_dragging.gif
:alt: Changing specific days

Going back to the general assignment screen you'll see the difference in
the days list colors for the employee's card. Every day is clickable and
it will pop up the shift details for that specific day.

.. image:: https://raw.githubusercontent.com/OCA/shift-planning/19.0/hr_shift/static/description/week_days_colors.png
:alt: Card with different shifts

Detecting employees issues
--------------------------

An employee could be on leave for one or serveral days of a planning
week. In that case when an assignment is made for that employee the
overlapping days will be flagged as unavailable and no shift will be
assigned.

We can detect those issues from the general plannings view in *Shift >
Plannings*.

.. image:: https://raw.githubusercontent.com/OCA/shift-planning/19.0/hr_shift/static/description/planning_card.png
:alt: Mark as reviewed

To set the issue as reviewed we can click on the checkbox of the
employee's assignment card. It won't be counted on the issues summary
when is checked.

.. image:: https://raw.githubusercontent.com/OCA/shift-planning/19.0/hr_shift/static/description/reviewed_checkbox.png
:alt: Mark as reviewed

Generate planning from another one
----------------------------------

We can generate plannings from other planning so we can copy the shifts
assigments. To do so you can either click on **Generate planning** from
the general plannings view in *Shifts > Plannings* or click on **Copy to
new planning** from the origin planning form.

In both cases a wizard will open where you can choose to which week will
the new planning correspond to and from which planning we'll be copying
the assignations.

Regenerate shifts.
------------------

We can reset the assignments from the planning form clicking on
*Regenerate shifts*.

My shifts
---------

All the internal users can view their assigned shifts going to *Shifts >
My shifts*.

Known issues / Roadmap
======================

- We can use the *Reviewed* field for more purposes, like setting the
planning state when all the shifts are reviewed.
- Support working pauses.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/shift-planning/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/shift-planning/issues/new?body=module:%20hr_shift%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Tecnativa

Contributors
------------

- `Tecnativa <https://tecnativa.com>`__:

- David Vidal
- Pedro M. Baeza

- `Tesseratech <https://www.tesseratech.es>`__:

- Abraham Anes

- `Grupo Isonor <https://www.grupoisonor.es>`__:

- David Palanca

Other credits
-------------

`Sun Moon icon <https://lucide.dev/icons/sun-moon>`__ by Lucide

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/shift-planning <https://github.com/OCA/shift-planning/tree/19.0/hr_shift>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions hr_shift/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import wizards
29 changes: 29 additions & 0 deletions hr_shift/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright 2024 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Employees Shifts",
"summary": "Define shifts for employees",
"version": "19.0.1.0.0",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/shift-planning",
"category": "Human Resources/Shifts",
"depends": ["hr", "base_sparse_field"],
"demo": ["demo/demo.xml"],
"data": [
"security/hr_shift_security.xml",
"security/ir.model.access.csv",
"views/shift_planning_views.xml",
"views/shift_template_views.xml",
"views/res_config_settings_views.xml",
"wizards/shift_planning_wizard_views.xml",
"views/hr_employee_views.xml",
],
"assets": {
"web.assets_backend": [
"/hr_shift/static/src/js/**/*.js",
"/hr_shift/static/src/scss/shift.scss",
"/hr_shift/static/src/xml/generate_planning_views.xml",
],
},
}
36 changes: 36 additions & 0 deletions hr_shift/demo/demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="template_morning" model="hr.shift.template">
<field name="name">Morning 8-14</field>
<field name="day_of_week_start">0</field>
<field name="day_of_week_end">4</field>
<field name="start_time">8</field>
<field name="end_time">14</field>
<field name="color">10</field>
</record>
<record id="template_afternoon" model="hr.shift.template">
<field name="name">Afternoon 14-20</field>
<field name="day_of_week_start">0</field>
<field name="day_of_week_end">4</field>
<field name="start_time">14</field>
<field name="end_time">20</field>
<field name="color">4</field>
</record>
<record id="hr.employee_admin" model="hr.employee">
<field name="shift_planning" eval="True" />
</record>
<record id="hr.employee_qdp" model="hr.employee">
<field name="shift_planning" eval="True" />
</record>
<record id="planning_2025_02" model="hr.shift.planning">
<field name="year">2025</field>
<field name="week_number">2</field>
<field name="start_date">2025-01-06</field>
<field name="end_date">2025-01-12</field>
</record>
<function
model="hr.shift.planning"
name="generate_shifts"
eval="[[ref('planning_2025_02')]]"
/>
</odoo>
Loading
Loading