Skip to content

[18.0][IMP] hr_shift: prevent overlapping shift planning lines for the same… - #48

Open
cvinh wants to merge 1 commit into
OCA:18.0from
invitu:18.0-imp_hr_shift_add_contraint_planning_lines
Open

[18.0][IMP] hr_shift: prevent overlapping shift planning lines for the same…#48
cvinh wants to merge 1 commit into
OCA:18.0from
invitu:18.0-imp_hr_shift_add_contraint_planning_lines

Conversation

@cvinh

@cvinh cvinh commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

… employee

hr.shift.planning.line has no constraint that prevents two lines from sharing time with each other for the same employee. Two lines can be created for the same weekday with overlapping start_time/end_time ranges (for example after a manual drag/resize on the calendar view, or by adding a second line whose template overlaps an existing one), which puts the employee in two shifts at the same instant.

Add a constraint on hr.shift.planning.line that rejects such overlaps, applied only between assigned lines of the same employee.

… employee

hr.shift.planning.line has no constraint that prevents two lines from
sharing time with each other for the same employee. Two lines can be
created for the same weekday with overlapping start_time/end_time
ranges (for example after a manual drag/resize on the calendar view,
or by adding a second line whose template overlaps an existing one),
which puts the employee in two shifts at the same instant.

Add a constraint on hr.shift.planning.line that rejects such
overlaps, applied only between assigned lines of the same employee.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants