In addition to security rights (was already implemented), now follow
`create="0"` / `edit="0"` / `delete="0"` attributes one can set onto the
`timeline` tag, same as in other Odoo views.
This commit fixes redraw issues when setting a `mode` attribute in the
`timeline` view tag.
This mode specifies a default scale one would want to set; same as when
clicking on Day/Week/Month buttons at the top of the view.
Initial rendering had issues here because data was loaded too soon,
before the timeline component was rendered/ready. The fix is to load
data into the component only after initial redraw event, called
`changed` (see <https://visjs.github.io/vis-timeline/docs/timeline/#Events>).
There was old code attempting to call `on_scale_xxx_clicked` methods at
load time to simulate clicks on these Day/Week/Month buttons, but these
methods have been renamed so this code is no longer working.
This commit also removes the `current_window` instance variable, not
needed and actually confusing as the timeline component already
maintains its own start/end information (which we can query with
`timeline.getWindow()`).
Fix bug #2266: before this fix, the lines of the timeline view were always sorted by alphabetical order, ignoring the native order of the model on which the group_by field points to.
Fix duplicate entries in the 'fields' argument when the 'colors' parameters uses the same field in multiple conditions.
Update README.rst
[FIX] Remove console.log
[ADD] Make timeline.fit optional
[FIX] Use stringified points
[IMP] Reversed the arrow head and fixed lint issues
[IMP] Use options parameter for line color and width
[FIX] Version number
[IMP] Minor improvements