Skip to content

[18.0][IMP] hr_shift: use employee name instead of weekday in line display_… - #47

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

[18.0][IMP] hr_shift: use employee name instead of weekday in line display_…#47
cvinh wants to merge 1 commit into
OCA:18.0from
invitu:18.0-imp_hr_shift_replace_weekday_by_employee_in_calendar_view

Conversation

@cvinh

@cvinh cvinh commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

…name

hr.shift.planning.line._compute_display_name currently produces '{weekday} - {template or state}'. That format is redundant in every place the display_name is actually shown to end users:

  • On the calendar view, the weekday is the column position, so writing it inside the block label just repeats what the grid already conveys.
  • On the list and form views, day_number is a dedicated field already rendered as its own column or field, so the weekday appears twice on the same row.

Meanwhile the field the display_name lacks is the employee, which makes the identity of a line indistinguishable from another line of the same planning on the same weekday (two employees sharing 'Wednesday - Morning' get the exact same display_name, so any breadcrumb, popover title, chatter mention or mail template that relies on display_name cannot tell them apart).

Replace the weekday by the employee's name in the format expression and update @api.depends accordingly. day_number remains fully available through its own field wherever it is needed (calendar column, list column, form field). The employee full name is used as-is, without truncation, consistent with how it appears in every other HR view.

…name

hr.shift.planning.line._compute_display_name currently produces
'{weekday} - {template or state}'. That format is redundant in every
place the display_name is actually shown to end users:

- On the calendar view, the weekday is the column position, so
  writing it inside the block label just repeats what the grid
  already conveys.
- On the list and form views, day_number is a dedicated field
  already rendered as its own column or field, so the weekday
  appears twice on the same row.

Meanwhile the field the display_name lacks is the employee, which
makes the identity of a line indistinguishable from another line
of the same planning on the same weekday (two employees sharing
'Wednesday - Morning' get the exact same display_name, so any
breadcrumb, popover title, chatter mention or mail template that
relies on display_name cannot tell them apart).

Replace the weekday by the employee's name in the format expression
and update @api.depends accordingly. day_number remains fully
available through its own field wherever it is needed (calendar
column, list column, form field). The employee full name is used
as-is, without truncation, consistent with how it appears in every
other HR view.
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