50 Commits

Author SHA1 Message Date
Bastian Guenther
486f6133d8 [16.0][FIX] web_timeline: Fixed error message when saving and closing form view in timeline #2619 2024-10-15 19:46:01 +02:00
Houzéfa Abbasbhay
907aa64876 [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.
2024-09-27 10:38:29 +02:00
OCA-git-bot
5ca3a558f9 Merge PR #2778 into 16.0
Signed-off-by pedrobaeza
2024-09-26 17:48:20 +00:00
OCA-git-bot
a3f42ba097 Merge PR #2774 into 16.0
Signed-off-by pedrobaeza
2024-09-26 16:28:22 +00:00
Houzéfa Abbasbhay
432dbb2566 [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()`).
2024-07-08 09:51:21 +02:00
Houzéfa Abbasbhay
08139ea24d [IMP] web_timeline: Align to top instead of bottom
This avoids somewhat ugly very large "Unassigned" first row.
2024-04-08 09:22:35 +02:00
Houzéfa Abbasbhay
b69410f4b5 [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.
2024-04-08 09:22:22 +02:00
Houzéfa Abbasbhay
98bc9851e6 [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).
2024-04-04 09:41:03 +02:00
Houzéfa Abbasbhay
bc577b6656 [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.
2024-04-02 16:04:35 +02:00
Henrik Norlin
c253255e9e [FIX] web_timeline: date_delay = date_stop - date_start 2023-09-03 17:41:17 +02:00
Henrik Norlin
2b218919e4 [FIX] web_timeline: Add record - FormViewDialog - resId: null -> false (cannot be null) 2023-08-29 21:52:39 +02:00
Yadier A. De Quesada
7dbe95bbe3 [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
2023-06-02 18:00:50 -04:00
anjeel.haria
995e9e8af7 [MIG] web_timeline: Migration to 16.0
Syntax changes

Syntax changes
2023-03-01 16:03:37 +01:00
jguenat
832bba7520 [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
2023-03-01 15:51:01 +01:00
jguenat
8245aaa885 [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
2023-03-01 15:51:01 +01:00
Alexis de Lattre
a9f6eb53e5 [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.
2023-03-01 15:51:01 +01:00
Luis D. Lafaurie
a3405673c8 [IMP] web_timeline: allow UNASSIGNED grouping when using M2M field 2023-03-01 15:51:01 +01:00
CarlosRoca13
07ef036e00 [FIX] web_timeline: Allow groupby m2m fields 2023-03-01 15:51:01 +01:00
Holger Brunn
e614a7a149 [FIX] web_timeline: Don't crash when restoring timeline from breadcrumb 2023-03-01 15:51:01 +01:00
Murtaza Mithaiwala
d4272e106a [14.0][MIG] Migrated web_timeline. 2023-03-01 15:51:01 +01:00
Murtaza Mithaiwala
e86e087980 [FIX] Travis 2023-03-01 15:51:01 +01:00
Alexandre Díaz
6e0e29a3dd [FIX] web_timeline: Change draw_dependencies 2023-03-01 15:51:01 +01:00
Alexandre Díaz
d661b46702 [IMP] web_timeline: CSS vis items 2023-03-01 15:51:01 +01:00
Alexandre Díaz
3c5eb31e0b [FIX] web_timeline: Change vis-timeline library import 2023-03-01 15:51:01 +01:00
Alexandre Díaz
54706cb673 [MIG] web_timeline: Finish migration to 13.0 2023-03-01 15:51:01 +01:00
Thong Nguyen Van
18267a7cc2 [MIG] web_timeline: Migration to 13.0 2023-03-01 15:51:01 +01:00
Thong Nguyen Van
4190881650 [IMP] web_timeline: black, isort 2023-03-01 15:51:01 +01:00
denislour
564fb4e7d0 [12.0][web_timeline] Fix bug from group_order: locale instead locate. 2023-03-01 15:51:01 +01:00
denislour
51699368ac [12.0][FIX]web_timeline: fix group orders 2023-03-01 15:51:01 +01:00
tarteo
1f4fe5450e [FIX] web_timeline: Reloading view
[FIX] web_timeline: Reloading view

[FIX] web_timeline: Reloading view
2023-03-01 15:51:01 +01:00
Cyril VINH-TUNG
ffca9cfd2a [web_timeline][IMP] Add margin support in web_timeline (#1135) 2023-03-01 15:51:01 +01:00
Invitu
a955282450 [IMP] Add stack support 2023-03-01 15:51:01 +01:00
tarteo
51eabbcd89 [MIG] web_timeline: Migration to 12.0 2023-03-01 15:51:01 +01:00
Dennis Sluijk
e12ed1f340 [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
2023-03-01 15:51:01 +01:00
tarteo
74687a96e0 [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
2023-03-01 15:51:01 +01:00
tarteo
ec50ed9d4c [ADD] field_utils to web_timeline
[UPD] Version number

[UPD] README
2023-03-01 15:51:01 +01:00
tarteo
0c11c37791 [IMP] web_timeline: Templates implementation like kanban
[IMP] web_timeline: Templates implementation like kanban

[ADD] Check if template exists

Update README.rst
2023-03-01 15:51:01 +01:00
Dennis Sluijk
fc2cd4b740 [FIX] web_timeline: Make colors attribute optional (#969) 2023-03-01 15:51:01 +01:00
Martin Nicolas Cuesta
65b3ea1ab6 [FIX] Missing GroupClick Functionality 2023-03-01 15:51:01 +01:00
Martin Nicolas Cuesta
652b004129 [MIG] web_timeline module from v10 to v11
* Update Version in Manifest
* Remove enconding in .py files
* Rewrite the view definition according to version 11
2023-03-01 15:51:01 +01:00
Nicolas PIGANEAU
6870999882 Fixed web_timeline.css
CSS classes have changed with the updated version of vis.js
2023-03-01 15:51:01 +01:00
adrien.didenot
a853ea4830 [IMP] change the option to initialize the timeline window on display.
Change the attribute 'default_window' to 'mode' like the Odoo calendar view (to be iso functional)
2023-03-01 15:51:01 +01:00
adrien.didenot
851851ec54 [IMP] Add an option to initialize the timeline window on display.
The default window display all the events (aka 'fit'), in case of events spread over the year, the events are invisibles (too small to be readable)

Signed-off-by: adrien.didenot <adrien.didenot@horanet.com>
2023-03-01 15:51:01 +01:00
adrien.didenot
4b9e9b1fa4 [Fix OCA/project#317] Add the property date_delay to TimeLine views (same as base Calendar view)
In Odoo calendar view, the attribute date_delay is an alternative to date_stop, to provides the duration of the event instead of its end date.
This commit integrate this attribute to the Timeline view, but contrary to the base Calendar view the Timeline view could use both arguments (date_stop and date_delay) simultaneously.

Signed-off-by: adrien.didenot <adrien.didenot@horanet.com>
2023-03-01 15:51:01 +01:00
adrien.didenot
d3a323d9db [10.0][IMP] web_timeline improvements:
* Update the vis.js framework to latest stable version (v4.20.1) to add new functionality and save almost
400ko of source code in odoo assets (the vis dev team has isolate the code for timeline widget from the
 rest of their widgets)

* Add the possibility to display events with no duration (instantaneous) as the same time has regular events

* Add the possibility to choose between two scroll mode :
  -  zoom in time resolution (default)
  or
  -  vertical scroll (web browser default behaviour)

Signed-off-by: adrien.didenot <adrien.didenot@horanet.com>
2023-03-01 15:51:01 +01:00
Jose M
97d2ef1fff [10.0] [FIX] [web_timeline] Correct write when grouped by (#678)
* [FIX] Correct write when grouped by

* Remove blank lines

* Minor changes
2023-03-01 15:51:01 +01:00
Pedro M. Baeza
5df300f3e1 [MIG] web_timeline: Migration to 9.0 2023-03-01 15:51:01 +01:00
Holger Brunn
1379a70021 [IMP] web_timeline: add few features 2023-03-01 15:51:01 +01:00
Adrien Peiffer (ACSONE)
c0bd493b4e [IMP] web_timeline: Several improvements:
* Avoid to display all items of group_by model
* Remove unnecessary readgroup
* Remove dependency on project. Modify module structure. Imporve readme file.
* Add setup.py
2023-03-01 15:51:01 +01:00
Laurent Mignon
cf4b6b8e87 [IMP] web_timeline: Extracted from incubator 2023-03-01 15:51:01 +01:00