hr_timesheet_sheet* fixes: back to list after remove a timesheet. bulk unfreeze confirmed and pending sheets

This commit is contained in:
Luis 2026-10-01 09:38:17 +02:00
parent 8b0d0bb6cc
commit 0323b6672e
11 changed files with 354 additions and 34 deletions

View file

@ -8,6 +8,13 @@ section that depends on the configured policy. Nothing is deleted until
**Delete permanently** is pressed, and the button is hidden when something
blocks the deletion.
Deleting from the form leaves the user on the list of timesheet sheets, since
the form he was on shows a sheet that no longer exists: *My Timesheet Sheets*,
or *All Timesheet Sheets* when a timesheet administrator deletes the sheet of
another employee. The deleted sheet is not kept in the breadcrumb. Deleting
several sheets from the **Action** menu of a list leaves that list where it
was, with its filters and its grouping.
A plain ``sheet.unlink()`` from a script or a server action raises a
``UserError`` that points to the button, so the confirmation step cannot be
skipped by accident. Code that really means to delete does