Commit Graph

1052 Commits (decf2592df8c1c60bfb96d7a1cc04b7a058a9067)

Author SHA1 Message Date
Carlos Lopez decf2592df [MIG] web_timeline: Migration to 17.0
- Convert Moment.js to Luxon.
- Replace Underscore.js with native JavaScript code.
- Migrate legacy views to the new system and add an architecture parser to separate logic.
- added basic test
2025-04-21 14:00:03 +05:30
Carlos Lopez 2037dd2932 [MOVE] web_timeline: new folder structure according Odoo guideslines 2025-04-21 14:00:03 +05:30
Carlos Lopez 2e4539410d [IMP] web_timeline: pre-commit auto fixes 2025-04-21 14:00:03 +05:30
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 1c9754467e [IMP] web_timeline: Handle inverted date ranges
Inverted dates make no functional sense, but when they do happen, this
change allows displaying them as single points in the timeline (same as
when begin=end).

We currently do have such demo data when installing project_timeline.
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
Houzéfa Abbasbhay 030196a6f0 Translated using Weblate (French)
Currently translated at 100.0% (13 of 13 strings)

Translation: web-16.0/web-16.0-web_timeline
Translate-URL: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_timeline/fr/
2025-04-21 14:00:03 +05:30
mymage 379aa9574a Added translation using Weblate (Italian) 2025-04-21 14:00:03 +05:30
Adriano Prado 13a1854dd0 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (13 of 13 strings)

Translation: web-16.0/web-16.0-web_timeline
Translate-URL: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_timeline/pt_BR/
2025-04-21 14:00:03 +05:30
Weblate 0aafc1e360 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: web-16.0/web-16.0-web_timeline
Translate-URL: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_timeline/
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
Ivorra78 350d7378e2 Translated using Weblate (Spanish)
Currently translated at 100.0% (13 of 13 strings)

Translation: web-16.0/web-16.0-web_timeline
Translate-URL: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_timeline/es/
2025-04-21 14:00:03 +05:30
Henrik Norlin f6aecb4af6 [FIX] web_timeline: Add record - FormViewDialog - resId: null -> false (cannot be null) 2025-04-21 14:00:03 +05:30
Yadier A. De Quesada 6f7a5d62e7 [FIX] web_timeline: css and styles not charged when rendering timeline
On library version update a new feature was added at Timeline creation level to
allow modifying the xss. By keeping it active the css classes are not showed

As the view is on backend, has no sense to keep it active. So we deactivate the
feature to allow show the timeline correctly.

TT43238
2025-04-21 14:00:03 +05:30
Bole 32c0fd9d01 Translated using Weblate (Croatian)
Currently translated at 100.0% (13 of 13 strings)

Translation: web-16.0/web-16.0-web_timeline
Translate-URL: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_timeline/hr/
2025-04-21 14:00:03 +05:30
Ediz Duman 1ada0e2a68 Added translation using Weblate (Turkish) 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
jguenat 491b0f8e15 [FIX] web_timeline: updateProm.finally is not a function
Following odoo#102621 an UncaughtPromiseError > TypeError occured each time an update was triggered in timeline view
Fixed by returning super
2025-04-21 14:00:03 +05:30
jguenat a2bcaf7944 [FIX] web_timeline: utc and create_completed
fix wrong time used when creating new record

on record creation timeline view was reloaded and all items disappeared
fix by removing unnecessary reload
2025-04-21 14:00:03 +05:30
oca-ci 3e804cf363 [UPD] Update web_timeline.pot 2025-04-21 14:00:03 +05:30
Alexis de Lattre e83b790760 Update vis-timeline-graph2d lib: 7.3.4 -> 7.7.0 2025-04-21 14:00:03 +05:30
Alexis de Lattre 48b37a3338 [FIX] web_timeline: order group_by field
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.
2025-04-21 14:00:02 +05:30
Luis D. Lafaurie 00c43a2a02 [IMP] web_timeline: allow UNASSIGNED grouping when using M2M field 2025-04-21 14:00:02 +05:30
CarlosRoca13 385031fe22 [FIX] web_timeline: Allow groupby m2m fields 2025-04-21 14:00:02 +05:30
Holger Brunn 2e99d3eae7 [FIX] web_timeline: Don't crash when restoring timeline from breadcrumb 2025-04-21 14:00:02 +05:30
Cesar Andres Sanchez 3f3e48d491 [MIG] web_timeline: Migration to 15.0 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
Murtaza Mithaiwala babb8dde5a [FIX] Travis 2025-04-21 14:00:02 +05:30
Alexandre Díaz 5a2816f03e [FIX] web_timeline: Change draw_dependencies 2025-04-21 14:00:02 +05:30
Alexandre Díaz 529e758e83 [IMP] web_timeline: CSS vis items 2025-04-21 14:00:02 +05:30
Alexandre Díaz e8b9317e35 [FIX] web_timeline: Change vis-timeline library import 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
Thong Nguyen Van 62ddec6b2c [IMP] web_timeline: black, isort 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
denislour 7c0cc8ff7f [12.0][web_timeline] Fix bug from group_order: locale instead locate. 2025-04-21 14:00:02 +05:30
denislour a16512cb92 [12.0][FIX]web_timeline: fix group orders 2025-04-21 14:00:02 +05:30
tarteo 7a0195567c [FIX] web_timeline: Reloading view
[FIX] web_timeline: Reloading view

[FIX] web_timeline: Reloading view
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
Invitu 0ba6a4b056 [IMP] Add stack support 2025-04-21 14:00:02 +05:30
tarteo b4478d6df2 [IMP] Readme: Available attribute list 2025-04-21 14:00:02 +05:30
tarteo c72a2795a8 [MIG] web_timeline: Migration to 12.0 2025-04-21 14:00:02 +05:30
Dennis Sluijk 264fa59138 [ADD] Enable multiselect
[IMP] Prevent flickering

[IMP] Fixed headers

[ADD] Create new record by date range selection

Remove roadmap item from readme

[FIX] minimal height
2025-04-21 14:00:02 +05:30
tarteo 95fffe2795 [ADD] web_timeline: New dependency_arrow attribute
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
2025-04-21 14:00:02 +05:30
tarteo 550498ef8a [ADD] field_utils to web_timeline
[UPD] Version number

[UPD] README
2025-04-21 14:00:02 +05:30