1+ .. image :: https://odoo-community.org/readme-banner-image
2+ :target: https://odoo-community.org/get-involved?utm_source=readme
3+ :alt: Odoo Community Association
4+
15============
26Web timeline
37============
@@ -7,13 +11,13 @@ Web timeline
711 !! This file is generated by oca-gen-addon-readme !!
812 !! changes will be overwritten. !!
913 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10- !! source digest: sha256:f7afcee2d058a44cc7b44daf86593d10300c09feae36a156e0bdebaf3cb9836a
14+ !! source digest: sha256:b1f365d7c54525677b42a9ea0ba1c61c2b9081842ee68246c77c710efacfd48f
1115 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1216
1317.. |badge1 | image :: https://img.shields.io/badge/maturity-Production%2FStable-green.png
1418 :target: https://odoo-community.org/page/development-status
1519 :alt: Production/Stable
16- .. |badge2 | image :: https://img.shields.io/badge/licence -AGPL--3-blue.png
20+ .. |badge2 | image :: https://img.shields.io/badge/license -AGPL--3-blue.png
1721 :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1822 :alt: License: AGPL-3
1923.. |badge3 | image :: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
@@ -45,88 +49,64 @@ Configuration
4549You need to define a view with the tag <timeline> as base element. These
4650are the possible attributes for the tag:
4751
48- +------------------+-----------+-------------------------------------+
49- | Attribute | Required? | Description |
50- +==================+===========+=====================================+
51- | date_start | **Yes ** | Defines the name of the field of |
52- | | | type date that contains the start |
53- | | | of the event. |
54- +------------------+-----------+-------------------------------------+
55- | date_stop | No | Defines the name of the field of |
56- | | | type date that contains the end of |
57- | | | the event. The date_stop can be |
58- | | | equal to the attribute date_start |
59- | | | to display events has 'point' on |
60- | | | the Timeline (instantaneous event). |
61- +------------------+-----------+-------------------------------------+
62- | date_delay | No | Defines the name of the field of |
63- | | | type float/integer that contain the |
64- | | | duration in hours of the event, |
65- | | | default = 1. |
66- +------------------+-----------+-------------------------------------+
67- | default_group_by | **Yes ** | Defines the name of the field that |
68- | | | will be taken as default group by |
69- | | | when accessing the view or when no |
70- | | | other group by is selected. |
71- +------------------+-----------+-------------------------------------+
72- | zoomKey | No | Specifies whether the Timeline is |
73- | | | only zoomed when an additional key |
74- | | | is down. Available values are '' |
75- | | | (does not apply), 'altKey', |
76- | | | 'ctrlKey', or 'metaKey'. Set this |
77- | | | option if you want to be able to |
78- | | | use the scroll to navigate |
79- | | | vertically on views with a lot of |
80- | | | events. |
81- +------------------+-----------+-------------------------------------+
82- | mode | No | Specifies the initial visible |
83- | | | window. Available values are: 'day' |
84- | | | to display the current day, 'week', |
85- | | | 'month' and 'fit'. Default value is |
86- | | | 'fit' to adjust the visible window |
87- | | | such that it fits all items. |
88- +------------------+-----------+-------------------------------------+
89- | margin | No | Specifies the margins around the |
90- | | | items. It should respect the JSON |
91- | | | format. For example |
92- | | | '{"item":{"horizontal":-10}}'. |
93- | | | Available values are: |
94- | | | '{"axis":<number>}' (The minimal |
95- | | | margin in pixels between items and |
96- | | | the time axis) '{"item":<number>}' |
97- | | | (The minimal margin in pixels |
98- | | | between items in both horizontal |
99- | | | and vertical direction), |
100- | | | '{"item":{"horizontal":<number>}}' |
101- | | | (The minimal horizontal margin in |
102- | | | pixels between items), |
103- | | | '{"item":{"vertical":<number>}}' |
104- | | | (The minimal vertical margin in |
105- | | | pixels between items), |
106- | | | '{"item":{"horizont |
107- | | | al":<number>,"vertical":<number>}}' |
108- | | | (Combination between horizontal and |
109- | | | vertical margins in pixels between |
110- | | | items). |
111- +------------------+-----------+-------------------------------------+
112- | event_open_popup | No | When set to true, it allows to edit |
113- | | | the events in a popup. If not |
114- | | | (default value), the record is |
115- | | | edited changing to form view. |
116- +------------------+-----------+-------------------------------------+
117- | stack | No | When set to false, items will not |
118- | | | be stacked on top of each other |
119- | | | such that they do overlap. |
120- +------------------+-----------+-------------------------------------+
121- | colors | No | Allows to set certain specific |
122- | | | colors if the expressed condition |
123- | | | (JS syntax) is met. |
124- +------------------+-----------+-------------------------------------+
125- | dependency_arrow | No | Set this attribute to a x2many |
126- | | | field to draw arrows between the |
127- | | | records referenced in the x2many |
128- | | | field. |
129- +------------------+-----------+-------------------------------------+
52+ +------------------+-----------+--------------------------------------------------------+
53+ | Attribute | Required? | Description |
54+ +==================+===========+========================================================+
55+ | date_start | **Yes ** | Defines the name of the field of type date that |
56+ | | | contains the start of the event. |
57+ +------------------+-----------+--------------------------------------------------------+
58+ | date_stop | No | Defines the name of the field of type date that |
59+ | | | contains the end of the event. The date_stop can be |
60+ | | | equal to the attribute date_start to display events |
61+ | | | has 'point' on the Timeline (instantaneous event). |
62+ +------------------+-----------+--------------------------------------------------------+
63+ | date_delay | No | Defines the name of the field of type float/integer |
64+ | | | that contain the duration in hours of the event, |
65+ | | | default = 1. |
66+ +------------------+-----------+--------------------------------------------------------+
67+ | default_group_by | **Yes ** | Defines the name of the field that will be taken as |
68+ | | | default group by when accessing the view or when no |
69+ | | | other group by is selected. |
70+ +------------------+-----------+--------------------------------------------------------+
71+ | zoomKey | No | Specifies whether the Timeline is only zoomed when an |
72+ | | | additional key is down. Available values are '' (does |
73+ | | | not apply), 'altKey', 'ctrlKey', or 'metaKey'. Set |
74+ | | | this option if you want to be able to use the scroll |
75+ | | | to navigate vertically on views with a lot of events. |
76+ +------------------+-----------+--------------------------------------------------------+
77+ | mode | No | Specifies the initial visible window. Available values |
78+ | | | are: 'day' to display the current day, 'week', 'month' |
79+ | | | and 'fit'. Default value is 'fit' to adjust the |
80+ | | | visible window such that it fits all items. |
81+ +------------------+-----------+--------------------------------------------------------+
82+ | margin | No | Specifies the margins around the items. It should |
83+ | | | respect the JSON format. For example |
84+ | | | '{"item":{"horizontal":-10}}'. Available values are: |
85+ | | | '{"axis":<number>}' (The minimal margin in pixels |
86+ | | | between items and the time axis) '{"item":<number>}' |
87+ | | | (The minimal margin in pixels between items in both |
88+ | | | horizontal and vertical direction), |
89+ | | | '{"item":{"horizontal":<number>}}' (The minimal |
90+ | | | horizontal margin in pixels between items), |
91+ | | | '{"item":{"vertical":<number>}}' (The minimal vertical |
92+ | | | margin in pixels between items), |
93+ | | | '{"item":{"horizontal":<number>,"vertical":<number>}}' |
94+ | | | (Combination between horizontal and vertical margins |
95+ | | | in pixels between items). |
96+ +------------------+-----------+--------------------------------------------------------+
97+ | event_open_popup | No | When set to true, it allows to edit the events in a |
98+ | | | popup. If not (default value), the record is edited |
99+ | | | changing to form view. |
100+ +------------------+-----------+--------------------------------------------------------+
101+ | stack | No | When set to false, items will not be stacked on top of |
102+ | | | each other such that they do overlap. |
103+ +------------------+-----------+--------------------------------------------------------+
104+ | colors | No | Allows to set certain specific colors if the expressed |
105+ | | | condition (JS syntax) is met. |
106+ +------------------+-----------+--------------------------------------------------------+
107+ | dependency_arrow | No | Set this attribute to a x2many field to draw arrows |
108+ | | | between the records referenced in the x2many field. |
109+ +------------------+-----------+--------------------------------------------------------+
130110
131111Optionally you can declare a custom template, which will be used to
132112render the timeline items. You have to name the template
0 commit comments