Skip to content

Conversation

quirino95
Copy link

When an employee requests some time-off, timesheet sheet is created if it doesn't exist, but sometimes department could be set wrong. By default, it's set with the same department of who approves time-off.

This is not correct, so my fix set department as the same of the employee who requested time-off.

These are the steps to reproduce the bug:

  1. Module hr_timesheet_sheet_autodraft should be active and Auto-draft Timesheet setting should be checked;
  2. Assign department A to employee 1
  3. Assign department B to employee 2
  4. Make sure project and task are correctly set in the time-off type that will be used for the test;
  5. Employee 1 requests time-off;
  6. Employee 2 approves time-off;

On approval, a new timesheet will be created for employee 1 with the department of employee 2.
With this fix, timesheet will be created with department of employee 1.

Copy link

github-actions bot commented Oct 5, 2025

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Oct 5, 2025
@aleuffre
Copy link

aleuffre commented Oct 6, 2025

@OCA/human-resources-maintainers Hi, this is a simple PR, could we ask for a review? We can FW once it's merged. Thanks!

@dreispt dreispt removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Oct 6, 2025
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.

4 participants