When dropping a record, it is updated and rerendered. The problem with
this behaviour is that if the record is redrag immediately after drop,
jquery-ui throws an error as the widget the user is trying to re-move
is being rerendered.
The solution provided by this commit is to block the draggable feature
while the record is being rerendered.
* removed hr.timesheet.report as it's mostly redundant with regular
views on analytic lines
* moved "detailed activities" to reporting, renamed it, added a pivot
view
* redirected timesheet link from HR dashboard to the detailed activities
action
- added department_id to analytic lines as that link is filtered by
department
- fixed bug in kanban view: button context wasn't evaluated in the
correct context
By putting the shortcuts lowercase, it is easier to remember and to user.
Instead of Alt + Shift + letter, we have Alt + letter for Windows and Linus users
Instead of Control + Alt + Shift + letter, we have Control + Alt + letter for mac users
The combinations Alt + d and Alt + e are reserved to the browsers, so other letters are chosen
for these actions
Use 'display: none' instead of 'visible: hidden' for the config button in
columns' header so that the columns' title can take full width if that button
is hidden.
Bonus: if the config dropdown is open, the button remains visible.
Commit 3b19fa426b fixed a bug where the column title of kanban group
was overflowing its area when too long. However, when the column is
folded, the title is now really small (width of the folded column)
and then stopped to add the "..." ellipsis.
The solution is to let the text overflow when the column is folded.
This bug was a consequence of commit 6c57935 which introduced a JS cache of
stuff like actions, fields_view... The fields_view being modified in place by
the kanban_view (which is obviously not a good practice), it was able to
identify its many2many fields only the first time the view was displayed, as
from the second time, it received an already processed version of the
fields_view in which is wasn't able to identify many2many fields. Thus, those
fields were only displayed the first time the view kanban view was displayed.
When the stage name is too long, the column header is messed up: the
'Settings' and the 'Quick Add' icons are located outside of the column.
The fix is to truncate stage names when they are too long.
opw-672710
These 2 commits in kanban view fixed 1 bug by introducing a few other
severe bugs. The tradeoff is not worth it, especially when it is
balanced again deleting some contacts in your database.
In non grouped mode, a recent fix (fixing race condition in do_search)
introduced a new bug, the dataset size is not correctly set.
This is a quick and dirty fix, I believe that changing the dataset
internals like this commit (and other) do is really not correct.
However, the correct fix (working on the dataset API) is more dangerous
in a stable release.
The do_search method still had a race condition because the
read_slice method of datasets alter ids. So, what could happen is
this: a long search is started, then a shorter search is started and
ended before the first search is completed. The ui is rendered
properly, but then the long search ends and alter the dataset. As
a result, the Kanban view is broken (cannot open a record anymore
because the dataset has the wrong ids).
This commit fixes the issue by doing basically what the read_slice
method did, except the ids altering part. However, it introduced
a new problem for x2many kanban views: these kanban view don't have
the same dataset, they have a datasetstatic. The naive substitution
does not work, so I had to reintroduce the old method in X2ManyKanbanView.
This commit introduces "Sub-task", a concept remotely similar to
the "delegated tasks" available in version 7.0, but covering a
more specific and narrow scope.
Activating Sub-tasks
--------------------
Sub-tasks are made available within any project by configuring
a "sub-task project" in the project settings. This feature is
considered low-level and technical, and only accessible with
"Technical Features" enabled.
The "sub-task project" may be the project itself.
Using Sub-tasks
---------------
Conceptually, a sub-task represents the allocation of a part
of the scope of its parent task. Multiple sub-task levels
are possible.
Once activated in project settings, a new "Sub-tasks" smart button
will appear on the task form, giving the option to view and
create sub-tasks. In addition, a new field "Sub-tasks Hours" will
appear next to the other computed "Hours" fields, representing
the total hours allocated to sub-tasks.
(Technically, the sum of the maximum between the planned hours
and spent hours of all sub-tasks, with spent hours always used
when a task is closed)
These sub-task hours will be dynamically subtracted from the
remaining hours of the task, and will therefore affect the
task's progress as well.
Upon creation, a sub-task will inherit the link to the
original sales order and procurement from its parent task, and
will by default be assigned to the "sub-task project" set on
the project of the parent task.
Enhancement
-----------
The kanban view for tasks will now display a color-coded label
with the number of remaining hours, whenever the percentage
of remaining hours is below 20% (orange=20%-, red=1%-).
Notes
-----------
This is a forward port of 43c42b304d
Since hr_timesheet has been migrated to the new API, the forward port changes mostly consists in migrating the sub-tasks system to the new API as well.
Prevent drag'n'drop in the following cases:
- Group by field is read-only
- Group by field is a date or datetime
This is necessary to avoid, for example, changing the state of a sales
order or an invoice without going through all the business logic.
Related to #7047
opw-671697
Prevent drag'n'drop in the following cases:
- Group by field is read-only
- Group by field is a date or datetime
This is necessary to avoid, for example, changing the state of a sales
order or an invoice without going through all the business logic.
Related to #7047
opw-671697