Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. web
  3. Web timeline v 12.0
  4. Sales Conditions FAQ

Web timeline

by ACSONE SA/NV https://github.com/OCA/web , Tecnativa https://github.com/OCA/web , Monk Software https://github.com/OCA/web , Onestein https://github.com/OCA/web , Trobz https://github.com/OCA/web , Odoo Community Association (OCA) https://github.com/OCA/web
Odoo 5
v 8.0 v 9.0 v 10.0 v 11.0 v 12.0 Third Party 5802
Download for v 12.0 Deploy on Odoo.sh
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 1036
Technical Name web_timeline
LicenseAGPL-3
Websitehttps://github.com/OCA/web
Versions 8.0 9.0 10.0 11.0 12.0 14.0 15.0 16.0 17.0 18.0
You bought this module and need support? Click here!

Web timeline

Production/Stable License: AGPL-3 OCA/web Translate me on Weblate Try me on Runboat

Define a new view displaying events in an interactive visualization chart.

The widget is based on the external library http://visjs.org/timeline_examples.html

Table of contents

  • Configuration
  • Usage
  • Known issues / Roadmap
  • Bug Tracker
  • Credits
    • Authors
    • Contributors
    • Other credits
      • Images
    • Maintainers

Configuration

You need to define a view with the tag <timeline> as base element. These are the possible attributes for the tag:

Attribute Required? Description
date_start Yes Defines the name of the field of type date that contains the start of the event.
date_stop No Defines the name of the field of type date that contains the end of the event. The date_stop can be equal to the attribute date_start to display events has ‘point’ on the Timeline (instantaneous event).
date_delay No Defines the name of the field of type float/integer that contain the duration in hours of the event, default = 1.
default_group_by Yes Defines the name of the field that will be taken as default group by when accessing the view or when no other group by is selected.
zoomKey No Specifies whether the Timeline is only zoomed when an additional key is down. Available values are ‘’ (does not apply), ‘altKey’, ‘ctrlKey’, or ‘metaKey’. Set this option if you want to be able to use the scroll to navigate vertically on views with a lot of events.
mode No Specifies the initial visible window. Available values are: ‘day’ to display the current day, ‘week’, ‘month’ and ‘fit’. Default value is ‘fit’ to adjust the visible window such that it fits all items.
margin No Specifies the margins around the items. It should respect the JSON format. For example ‘{“item”:{“horizontal”:-10}}’. Available values are: ‘{“axis”:<number>}’ (The minimal margin in pixels between items and the time axis) ‘{“item”:<number>}’ (The minimal margin in pixels between items in both horizontal and vertical direction), ‘{“item”:{“horizontal”:<number>}}’ (The minimal horizontal margin in pixels between items), ‘{“item”:{“vertical”:<number>}}’ (The minimal vertical margin in pixels between items), ‘{“item”:{“horizontal”:<number>,”vertical”:<number>}}’ (Combination between horizontal and vertical margins in pixels between items).
event_open_popup No When set to true, it allows to edit the events in a popup. If not (default value), the record is edited changing to form view.
stack No When set to false, items will not be stacked on top of each other such that they do overlap.
colors No Allows to set certain specific colors if the expressed condition (JS syntax) is met.
color_field No Allows to set a field (on the current model) that contains the HTML color (e.g. #FFFFFF). This option has priority over ‘colors’.
dependency_arrow No Set this attribute to a x2many field to draw arrows between the records referenced in the x2many field.

Optionally you can declare a custom template, which will be used to render the timeline items. You have to name the template ‘timeline-item’. These are the variables available in template rendering:

  • record: to access the fields values selected in the timeline definition.
  • field_utils: used to format and parse values (see available functions in web.field_utils).

You also need to declare the view in an action window of the involved model.

Example:

<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <record id="view_task_timeline" model="ir.ui.view">
        <field name="model">project.task</field>
        <field name="type">timeline</field>
        <field name="arch" type="xml">
            <timeline date_start="date_start"
                      date_stop="date_end"
                      string="Tasks"
                      default_group_by="user_id"
                      event_open_popup="true"
                      zoomKey="ctrlKey"
                      colors="#ec7063:user_id == false;#2ecb71:kanban_state=='done';"
                      dependency_arrow="task_dependency_ids">
                <field name="user_id"/>
                <templates>
                    <div t-name="timeline-item">
                        <div t-esc="record.display_name"/>
                        Assigned to:
                        <span t-esc="record.user_id[1]"/>
                    </div>
                </templates>
            </timeline>
        </field>
    </record>

    <record id="project.action_view_task" model="ir.actions.act_window">
        <field name="view_mode">kanban,tree,form,calendar,gantt,timeline,graph</field>
    </record>
</odoo>

Usage

For accessing the timeline view, you have to click on the button with the clock icon in the view switcher. The first time you access to it, the timeline window is zoomed to fit all the current elements, the same as when you perform a search, filter or group by operation.

You can use the mouse scroll to zoom in or out in the timeline, and click on any free area and drag for panning the view in that direction.

The records of your model will be shown as rectangles whose widths are the duration of the event according our definition. You can select them clicking on this rectangle. You can also use Ctrl or Shift keys for adding discrete or range selections. Selected records are hightlighted with a different color (but the difference will be more noticeable depending on the background color). Once selected, you can drag and move the selected records across the timeline.

When a record is selected, a red cross button appears on the upper left corner that allows to remove that record. This doesn’t work for multiple records although they were selected.

Records are grouped in different blocks depending on the group by criteria selected (if none is specified, then the default group by is applied). Dragging a record from one block to another change the corresponding field to the value that represents the block. You can also click on the group name to edit the involved record directly.

Double-click on the record to edit it. Double-click in open area to create a new record with the group and start date linked to the area you clicked in. By holding the Ctrl key and dragging left to right, you can create a new record with the dragged start and end date.

Known issues / Roadmap

  • Implement a more efficient way of refreshing timeline after a record update;
  • Make attrs attribute work;
  • Make action attributes work (create, edit, delete) like in form and tree views.

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • ACSONE SA/NV
  • Tecnativa
  • Monk Software
  • Onestein

Contributors

  • Laurent Mignon <laurent.mignon@acsone.eu>
  • Adrien Peiffer <adrien.peiffer@acsone.eu>
  • Pedro M. Baeza <pedro.baeza@tecnativa.com>
  • Leonardo Donelli <donelli@webmonks.it>
  • Adrien Didenot <adrien.didenot@horanet.com>
  • Dennis Sluijk <d.sluijk@onestein.nl>

Other credits

Images

  • Odoo Community Association: Icon.

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

Current maintainer:

tarteo

This module is part of the OCA/web project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.
  • Ratings
  • Discuss
Great module!! Does it work in the mobile browser?
by
Hock Tek Siong
on 1/15/20, 10:00 PM

Hello, It is working perfectly in the desktop browser. However, as soon as i switched to the Android Mobile Chrome (Huawei, Samsung, etc), it will throw this error. Any idea? Error: Uncaught TypeError: Cannot read property 'icon' of undefined http://localhost:8069/web/content/1767-2bb842a/web.assets_backend.js:1293 Traceback: TypeError: Cannot read property 'icon' of undefined at Class._renderSwitchButtons (http://localhost:8069/web/content/1767-2bb842a/web.assets_backend.js:1293:695) at Class._renderControlPanelElements (http://localhost:8069/web/content/1767-2bb842a/web.assets_backend.js:1291:390) at Class.start (http://localhost:8069/web/content/1767-2bb842a/web.assets_backend.js:1283:1427) at Class.prototype. [as start] (http://localhost:8069/web/content/1368-f9f595c/web.assets_common.js:3538:488) at http://localhost:8069/web/content/1368-f9f595c/web.assets_common.js:3684:52 at http://localhost:8069/web/content/1368-f9f595c/web.assets_common.js:802:681 at fire (http://localhost:8069/web/content/1368-f9f595c/web.assets_common.js:796:299) at Object.add [as done] (http://localhost:8069/web/content/1368-f9f595c/web.assets_common.js:797:467) at Array. (http://localhost:8069/web/content/1368-f9f595c/web.assets_common.js:802:649) at Function.each (http://localhost:8069/web/content/1368-f9f595c/web.assets_common.js:625:767)


Great module !!!
by
Đức Hậu Trần
on 11/21/19, 6:14 AM

Thanks for your module ! and i add mode TimelineView = false; in line 156 of file timeline_view.js to run in ODOO 13 and it has been work ^^. //Code this.controllerParams.date_start = this.date_start; this.controllerParams.date_stop = this.date_stop; this.controllerParams.date_delay = this.date_delay; this.controllerParams.actionContext = this.action.context; this.withSearchPanel = false; // fix for odoo 13 return this;


Great module !!!
by
Đức Hậu Trần
on 11/21/19, 6:12 AM

Thanks for your module ! and i add mode TimelineView = false; in line 156 of file timeline_view.js to run in ODOO 13 and it has been work ^^. this.controllerParams.date_start = this.date_start; this.controllerParams.date_stop = this.date_stop; this.controllerParams.date_delay = this.date_delay; this.controllerParams.actionContext = this.action.context; this.withSearchPanel = false; // fix for odoo 13 return this;


Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with