This commit fixes two bugs:
- 'quick_create' is a special value for the on_create option, it is not an
action xmlid. So when this option is set either in a ungrouped or in an
empty grouped Kanban view, we should try to execute 'quick_create'.
- the 'create' button is muted (btn-default instead of btn-primary) in
grouped Kanban with no column. This status should be updated at each
do_search, and each time a column is added/deleted.
In a previous refactor, qweb configuration was simplified. However, I
missed the fact that session.js sneakily configure the qweb instance
after the fact. As a result, the kanban view did not have the _s key in
its custom qweb instance default dict. This commit allow the qweb class
constructor to add default keys to the instance.
Now, kanban view can add _s, and everything is good.
Possibility to specify the action to execute when the user clicks on 'Create'
in the kanban view.
If set to magic 'quick_create', it opens the quick create in the first column.
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.