Commit Graph

17 Commits (a0962b588cea7d0342a8c20f5be435decc62ff3f)

Author SHA1 Message Date
Houzéfa Abbasbhay a0962b588c [IMP] web_timeline: Follow create/edit/delete attrs
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.
2025-04-21 14:00:03 +05:30
Houzéfa Abbasbhay 6bba685495 [FIX] web_timeline: Redraw issues with initial mode
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()`).
2025-04-21 14:00:03 +05:30
Houzéfa Abbasbhay bbd4d3af04 [IMP] web_timeline: Align to top instead of bottom
This avoids somewhat ugly very large "Unassigned" first row.
2025-04-21 14:00:03 +05:30
Houzéfa Abbasbhay 52d397ad3e [IMP] web_timeline: Overflow text, add hover colors
When an item label does not fit in its date-range box, overflow
according to
https://visjs.github.io/vis-timeline/examples/timeline/items/rangeOverflowItem.html

Previous CSS code was already trying to do that, but was selecting
`.vis-item.vis-item-content` instead of `.vis-item .vis-item-content`.

Displaying overflow text brings up layout issues solved by removing the
forced-100% width instruction.

This change also adds highlight when hovering a box, which is useful on
text that has overflown (as it has no borders).
2025-04-21 14:00:03 +05:30
Houzéfa Abbasbhay 576c33db48 [IMP] web_timeline: Add demo view on cron tasks
This way we can showcase this module without project_timeline.
2025-04-21 14:00:03 +05:30
Houzéfa Abbasbhay a70871d14f [FIX] web_timeline: Wrap fields_get arg into a list
By contract the first argument of the `fields_get` method is supposed to
be a list. Before this fix, `web_timeline` would call `fields_get` with
a string instead of a list.

Fortunately in case only 1 field is being grouped, this worked as Odoo
does an `x in y` comparison in its `fields_get` implementation, which
does pass in a simple `"project_id" in "project_id"` case.

But that call remains invalid and can break when `fields_get` has been
tweaked by other modules.
2025-04-21 14:00:03 +05:30
Henrik Norlin ea7e109fc0 [FIX] web_timeline: date_delay = date_stop - date_start 2025-04-21 14:00:03 +05:30
anjeel.haria a20b45ad92 [MIG] web_timeline: Migration to 16.0
Syntax changes

Syntax changes
2025-04-21 14:00:03 +05:30
oca-ci 3e804cf363 [UPD] Update web_timeline.pot 2025-04-21 14:00:03 +05:30
CarlosRoca13 385031fe22 [FIX] web_timeline: Allow groupby m2m fields 2025-04-21 14:00:02 +05:30
Murtaza Mithaiwala 1a10f42b09 [14.0][MIG] Migrated web_timeline. 2025-04-21 14:00:02 +05:30
Alexandre Díaz abeb6b9ce2 [MIG] web_timeline: Finish migration to 13.0 2025-04-21 14:00:02 +05:30
Thong Nguyen Van 79563a63e4 [MIG] web_timeline: Migration to 13.0 2025-04-21 14:00:02 +05:30
HemanginiPatel bff5373e05 [FIX][12.0] web_timeline: Scroll Issue. 2025-04-21 14:00:02 +05:30
Cyril VINH-TUNG a8902dda41 [web_timeline][IMP] Add margin support in web_timeline (#1135) 2025-04-21 14:00:02 +05:30
invitu 3cf85c55a0 [FIX] web_timeline: fix readme - To be squashed with previous one on migration (#1137) 2025-04-21 14:00:02 +05:30
tarteo b4478d6df2 [IMP] Readme: Available attribute list 2025-04-21 14:00:02 +05:30