Commit Graph

857 Commits (b58542a62c8d8f9ed9739ec823dd3a21f3fd8ffc)

Author SHA1 Message Date
oca-ci b58542a62c [UPD] Update web_timeline.pot 2025-04-01 11:46:28 +05:30
Carlos Lopez 293fead8d9 [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-01 11:46:28 +05:30
Carlos Lopez 614a3b133b [MOVE] web_timeline: new folder structure according Odoo guideslines 2025-04-01 11:46:28 +05:30
Carlos Lopez d9e66b6132 [IMP] web_timeline: pre-commit auto fixes 2025-04-01 11:46:28 +05:30
Houzéfa Abbasbhay 8de0b1776b [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-01 11:46:28 +05:30
Houzéfa Abbasbhay 6f514424be [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-01 11:46:28 +05:30
Houzéfa Abbasbhay 02c8da9abb [IMP] web_timeline: Align to top instead of bottom
This avoids somewhat ugly very large "Unassigned" first row.
2025-04-01 11:46:28 +05:30
Houzéfa Abbasbhay 464f590403 [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-01 11:46:28 +05:30
Houzéfa Abbasbhay 2217472893 [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-01 11:46:28 +05:30
Houzéfa Abbasbhay 0e11828513 [IMP] web_timeline: Add demo view on cron tasks
This way we can showcase this module without project_timeline.
2025-04-01 11:46:28 +05:30
Houzéfa Abbasbhay 0572c797d9 [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-01 11:46:28 +05:30
Houzéfa Abbasbhay 9f8ae608fa 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-01 11:46:28 +05:30
mymage 5af87f1fbb Added translation using Weblate (Italian) 2025-04-01 11:46:28 +05:30
Adriano Prado d7ff7c7bf1 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-01 11:46:28 +05:30
Weblate 32cc986a97 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-01 11:46:28 +05:30
Henrik Norlin ba8c1c42c0 [FIX] web_timeline: date_delay = date_stop - date_start 2025-04-01 11:46:28 +05:30
Ivorra78 4d47cf0fb9 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-01 11:46:28 +05:30
Henrik Norlin 700a3fc2ab [FIX] web_timeline: Add record - FormViewDialog - resId: null -> false (cannot be null) 2025-04-01 11:46:28 +05:30
Yadier A. De Quesada e29c979629 [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-01 11:46:28 +05:30
Bole 274706887a 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-01 11:46:28 +05:30
Ediz Duman e83e721722 Added translation using Weblate (Turkish) 2025-04-01 11:46:28 +05:30
anjeel.haria 42807dd5f8 [MIG] web_timeline: Migration to 16.0
Syntax changes

Syntax changes
2025-04-01 11:46:28 +05:30
jguenat 61575741f9 [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-01 11:46:28 +05:30
jguenat 242869afb9 [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-01 11:46:28 +05:30
oca-ci bc9d18c212 [UPD] Update web_timeline.pot 2025-04-01 11:46:28 +05:30
Alexis de Lattre 9c897fc6dc Update vis-timeline-graph2d lib: 7.3.4 -> 7.7.0 2025-04-01 11:46:28 +05:30
Alexis de Lattre 00fd31f68a [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-01 11:46:28 +05:30
Luis D. Lafaurie e6170824e9 [IMP] web_timeline: allow UNASSIGNED grouping when using M2M field 2025-04-01 11:46:28 +05:30
CarlosRoca13 ee1e65db87 [FIX] web_timeline: Allow groupby m2m fields 2025-04-01 11:46:28 +05:30
Holger Brunn 948716086c [FIX] web_timeline: Don't crash when restoring timeline from breadcrumb 2025-04-01 11:46:28 +05:30
Cesar Andres Sanchez 7a9241cafa [MIG] web_timeline: Migration to 15.0 2025-04-01 11:46:28 +05:30
Murtaza Mithaiwala d441894bbd [14.0][MIG] Migrated web_timeline. 2025-04-01 11:46:28 +05:30
Murtaza Mithaiwala 233310e0f6 [FIX] Travis 2025-04-01 11:46:28 +05:30
Alexandre Díaz b4226f8305 [FIX] web_timeline: Change draw_dependencies 2025-04-01 11:46:28 +05:30
Alexandre Díaz 032074d218 [IMP] web_timeline: CSS vis items 2025-04-01 11:46:28 +05:30
Alexandre Díaz 19fd116cf2 [FIX] web_timeline: Change vis-timeline library import 2025-04-01 11:46:28 +05:30
Alexandre Díaz 86df694ef7 [MIG] web_timeline: Finish migration to 13.0 2025-04-01 11:46:28 +05:30
Thong Nguyen Van f07afdc0d9 [MIG] web_timeline: Migration to 13.0 2025-04-01 11:46:28 +05:30
Thong Nguyen Van fbeee7438e [IMP] web_timeline: black, isort 2025-04-01 11:46:28 +05:30
HemanginiPatel fab43e2a1e [FIX][12.0] web_timeline: Scroll Issue. 2025-04-01 11:46:28 +05:30
denislour 873099232a [12.0][web_timeline] Fix bug from group_order: locale instead locate. 2025-04-01 11:46:28 +05:30
denislour 6d950b0675 [12.0][FIX]web_timeline: fix group orders 2025-04-01 11:46:28 +05:30
tarteo 08a86ea13f [FIX] web_timeline: Reloading view
[FIX] web_timeline: Reloading view

[FIX] web_timeline: Reloading view
2025-04-01 11:46:28 +05:30
Cyril VINH-TUNG 4deef7a977 [web_timeline][IMP] Add margin support in web_timeline (#1135) 2025-04-01 11:46:28 +05:30
invitu e7f9bc5f94 [FIX] web_timeline: fix readme - To be squashed with previous one on migration (#1137) 2025-04-01 11:46:28 +05:30
Invitu 6bcd74ba4a [IMP] Add stack support 2025-04-01 11:46:28 +05:30
tarteo 0f0aefd040 [IMP] Readme: Available attribute list 2025-04-01 11:46:28 +05:30
tarteo 4d6acd98b9 [MIG] web_timeline: Migration to 12.0 2025-04-01 11:46:28 +05:30
Dennis Sluijk a7aec98aae [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-01 11:46:28 +05:30
tarteo 2340d64570 [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-01 11:46:28 +05:30