hr_timesheet_sheet* fixes: back to list after remove a timesheet. bulk unfreeze confirmed and pending sheets
This commit is contained in:
parent
8b0d0bb6cc
commit
0323b6672e
11 changed files with 354 additions and 34 deletions
|
|
@ -9,6 +9,12 @@ To release the sheets that were left frozen by the review workflow, go to
|
|||
many sheets, how many timesheet entries and how many hours are about to be
|
||||
released. Confirming sets those sheets back to draft and clears their reviewer.
|
||||
|
||||
The wizard releases exactly the sheets it listed when it was opened, and the
|
||||
confirmation message counts them. A sheet frozen by somebody else while the
|
||||
dialog was on screen is not released: it shows up the next time the wizard is
|
||||
opened. Only the frozen sheets the user can see are listed, so on a
|
||||
multi-company database the figures follow the company switcher.
|
||||
|
||||
Installing the module never changes the state of a sheet on its own: unfreezing
|
||||
is always an explicit decision of the timesheet manager. Running the wizard
|
||||
twice is safe — the second run reports zero sheets and changes nothing.
|
||||
|
|
@ -19,4 +25,11 @@ once and the reviewer of the approved ones is lost.
|
|||
To decide which sheets count as frozen, override
|
||||
``hr_timesheet.sheet._unfreeze_domain()``. For instance, an installation that
|
||||
wants to keep its approved sheets as historical record can narrow it down to
|
||||
``[("state", "=", "confirm")]``.
|
||||
``[("state", "=", "confirm")]``. The domain is applied twice: once to list the
|
||||
sheets in the dialog, and again when the button is pressed, so a sheet it keeps
|
||||
out is never released.
|
||||
|
||||
``hr_timesheet.sheet._unfreeze_sheets()`` takes an optional recordset. Called
|
||||
with no argument it releases every frozen sheet, as before; called with a
|
||||
recordset it releases only those of them that the domain still considers
|
||||
frozen.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue