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
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

Problem implementing web_timeline

Subscribe

Get notified when there's activity on this post

This question has been flagged
viewsmodulebugstimeline
1 Reply
5048 Views
Avatar
Wojciech Dobrychłop

Hello, I am using Odoo Community edition version 12 and I am currently trying to implement the timeline view from the web_timeline module, available here:

https://odoo-community.org/shop/product/web-timeline-2812?maturity=production%2Fstable

I have installed it, along with the Project timeline module:

https://odoo-community.org/shop/product/project-timeline-2093?search=project+timeline

The project timeline module works correctly, so since it depends on web_timeline, I am assuming that web_timeline was installed correctly.


I tried to add the timeline view to my own module, but this error pops up whenever I try to upgrade it:

Error:
Odoo Server Error

Traceback (most recent call last):
  File "/home/wojdob/odoo-dev/odoo/odoo/tools/convert.py", line 758, in parse
    self._tags[rec.tag](rec, de, mode=mode)
  File "/home/wojdob/odoo-dev/odoo/odoo/tools/convert.py", line 663, in _tag_record
    record = model.with_context(rec_context)._load_records([data], self.mode == 'update')
  File "/home/wojdob/odoo-dev/odoo/odoo/models.py", line 3893, in _load_records
    records = self._load_records_create([data['values'] for data in to_create])
  File "/home/wojdob/odoo-dev/odoo/odoo/models.py", line 3807, in _load_records_create
    return self.create(values)
  File "<decorator-gen-32>", line 2, in create
  File "/home/wojdob/odoo-dev/odoo/odoo/api.py", line 462, in _model_create_multi
    return create(self, arg)
  File "/home/wojdob/odoo-dev/odoo/odoo/addons/base/models/ir_ui_view.py", line 428, in create
    return super(View, self).create(vals_list)
  File "<decorator-gen-3>", line 2, in create
  File "/home/wojdob/odoo-dev/odoo/odoo/api.py", line 462, in _model_create_multi
    return create(self, arg)
  File "/home/wojdob/odoo-dev/odoo/odoo/models.py", line 3588, in create
    records = self._create(data_list)
  File "/home/wojdob/odoo-dev/odoo/odoo/models.py", line 3674, in _create
    col_val = field.convert_to_column(val, self, stored)
  File "/home/wojdob/odoo-dev/odoo/odoo/fields.py", line 2016, in convert_to_column
    value = self.convert_to_cache(value, record)
  File "/home/wojdob/odoo-dev/odoo/odoo/fields.py", line 2028, in convert_to_cache
    raise ValueError("Wrong value for %s: %r" % (self, value))
ValueError: Wrong value for ir.ui.view.type: 'timeline'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/wojdob/odoo-dev/odoo/odoo/http.py", line 656, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/wojdob/odoo-dev/odoo/odoo/http.py", line 314, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/home/wojdob/odoo-dev/odoo/odoo/tools/pycompat.py", line 87, in reraise
    raise value
  File "/home/wojdob/odoo-dev/odoo/odoo/http.py", line 698, in dispatch
    result = self._call_function(**self.params)
  File "/home/wojdob/odoo-dev/odoo/odoo/http.py", line 346, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/wojdob/odoo-dev/odoo/odoo/service/model.py", line 98, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/wojdob/odoo-dev/odoo/odoo/http.py", line 339, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/wojdob/odoo-dev/odoo/odoo/http.py", line 941, in __call__
    return self.method(*args, **kw)
  File "/home/wojdob/odoo-dev/odoo/odoo/http.py", line 519, in response_wrap
    response = f(*args, **kw)
  File "/home/wojdob/odoo-dev/odoo/addons/web/controllers/main.py", line 966, in call_button
    action = self._call_kw(model, method, args, {})
  File "/home/wojdob/odoo-dev/odoo/addons/web/controllers/main.py", line 954, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/home/wojdob/odoo-dev/odoo/odoo/api.py", line 759, in call_kw
    return _call_kw_multi(method, model, args, kwargs)
  File "/home/wojdob/odoo-dev/odoo/odoo/api.py", line 746, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "<decorator-gen-67>", line 2, in button_immediate_upgrade
  File "/home/wojdob/odoo-dev/odoo/odoo/addons/base/models/ir_module.py", line 74, in check_and_log
    return method(self, *args, **kwargs)
  File "/home/wojdob/odoo-dev/odoo/odoo/addons/base/models/ir_module.py", line 627, in button_immediate_upgrade
    return self._button_immediate_function(type(self).button_upgrade)
  File "/home/wojdob/odoo-dev/odoo/odoo/addons/base/models/ir_module.py", line 561, in _button_immediate_function
    modules.registry.Registry.new(self._cr.dbname, update_module=True)
  File "/home/wojdob/odoo-dev/odoo/odoo/modules/registry.py", line 86, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/home/wojdob/odoo-dev/odoo/odoo/modules/loading.py", line 415, in load_modules
    processed_modules += load_marked_modules(cr, graph,
  File "/home/wojdob/odoo-dev/odoo/odoo/modules/loading.py", line 311, in load_marked_modules
    loaded, processed = load_module_graph(
  File "/home/wojdob/odoo-dev/odoo/odoo/modules/loading.py", line 222, in load_module_graph
    load_data(cr, idref, mode, kind='data', package=package, report=report)
  File "/home/wojdob/odoo-dev/odoo/odoo/modules/loading.py", line 68, in load_data
    tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)
  File "/home/wojdob/odoo-dev/odoo/odoo/tools/convert.py", line 802, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
  File "/home/wojdob/odoo-dev/odoo/odoo/tools/convert.py", line 865, in convert_xml_import
    obj.parse(doc.getroot(), mode=mode)
  File "/home/wojdob/odoo-dev/odoo/odoo/tools/convert.py", line 761, in parse
    pycompat.reraise(
  File "/home/wojdob/odoo-dev/odoo/odoo/tools/pycompat.py", line 86, in reraise
    raise value.with_traceback(tb)
  File "/home/wojdob/odoo-dev/odoo/odoo/tools/convert.py", line 758, in parse
    self._tags[rec.tag](rec, de, mode=mode)
  File "/home/wojdob/odoo-dev/odoo/odoo/tools/convert.py", line 663, in _tag_record
    record = model.with_context(rec_context)._load_records([data], self.mode == 'update')
  File "/home/wojdob/odoo-dev/odoo/odoo/models.py", line 3893, in _load_records
    records = self._load_records_create([data['values'] for data in to_create])
  File "/home/wojdob/odoo-dev/odoo/odoo/models.py", line 3807, in _load_records_create
    return self.create(values)
  File "<decorator-gen-32>", line 2, in create
  File "/home/wojdob/odoo-dev/odoo/odoo/api.py", line 462, in _model_create_multi
    return create(self, arg)
  File "/home/wojdob/odoo-dev/odoo/odoo/addons/base/models/ir_ui_view.py", line 428, in create
    return super(View, self).create(vals_list)
  File "<decorator-gen-3>", line 2, in create
  File "/home/wojdob/odoo-dev/odoo/odoo/api.py", line 462, in _model_create_multi
    return create(self, arg)
  File "/home/wojdob/odoo-dev/odoo/odoo/models.py", line 3588, in create
    records = self._create(data_list)
  File "/home/wojdob/odoo-dev/odoo/odoo/models.py", line 3674, in _create
    col_val = field.convert_to_column(val, self, stored)
  File "/home/wojdob/odoo-dev/odoo/odoo/fields.py", line 2016, in convert_to_column
    value = self.convert_to_cache(value, record)
  File "/home/wojdob/odoo-dev/odoo/odoo/fields.py", line 2028, in convert_to_cache
    raise ValueError("Wrong value for %s: %r" % (self, value))
odoo.tools.convert.ParseError: "Wrong value for ir.ui.view.type: 'timeline'" while parsing /home/wojdob/odoo-dev/local-addons/proofofconcept/views/views.xml:53, near
<record id="tms_order_view_timeline" model="ir.ui.view">
        <field name="model">tms.order</field>
        <field name="type">timeline</field>
        <field name="arch" type="xml">
            <data><timeline date_start="start_date" date_stop="end_date" string="Orders" default_group_by="driver">
            </timeline>
            <field name="driver"/>
                <templates>
                    <div t-name="timeline-item">
                        <div t-esc="record.start_date"/>
                        Assigned to:
                        <span t-esc="record.driver[1]"/>
                    </div>
                </templates>
            </data></field>
    </record>

Here is my full views.xml file:

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id='tms_order_action' model='ir.actions.act_window'>
<field name="name">Orders</field>
<field name="res_model">tms.order</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,timeline</field>
</record>

<menuitem name="TMS" id="tms_base_menu" />
<menuitem name="Orders" id="tms_order_menu" parent="tms_base_menu" action="tms_order_action"/>



<!-- Form View -->
<record id="tms_order_view_form" model="ir.ui.view">
<field name="name">Order Form</field>
<field name="model">tms.order</field>
<field name="arch" type="xml">
<form>
<group>
<group>
<field name="company_id"/>
<field name="start_date"/>
<field name="start_location"/>
<field name="end_date"/>
<field name="end_location"/>
</group>
<group>
<field name="driver"/>
<field name="vehicle"/>
<field name="description"/>
</group>
</group>
</form>
</field>
</record>

<!-- Tree(list) View -->
<record id="tms_order_view_tree" model="ir.ui.view">
<field name="name">Orders List</field>
<field name="model">tms.order</field>
<field name="arch" type="xml">
<tree>
<field name="company_id"/>
<field name="start_date"/>
<field name="end_date"/>
</tree>
</field>
</record>

<!-- Timeline View -->
<record id="tms_order_view_timeline" model="ir.ui.view">
<field name="model">tms.order</field>
<field name="type">timeline</field>
<field name="arch" type="xml">
<timeline date_start="start_date"
date_stop="end_date"
string="Orders"
default_group_by="driver">
</timeline>
<field name="driver"/>
<templates>
<div t-name="timeline-item">
<div t-esc="record.start_date"/>
Assigned to:
<span t-esc="record.driver[1]"/>
</div>
</templates>
</field>
</record>

<!-- Search View -->
<record id="tms_order_view_search" model="ir.ui.view">
<field name="name">Order Search</field>
<field name="model">tms.order</field>
<field name="arch" type="xml">
<search>
<field name="company_id"/>
</search>
</field>
</record>
</odoo>


And the model that I'm trying to set into the timeline:

from odoo import models, fields, api

class Order(models.Model):
_name = 'tms.order'

company_id = fields.Many2one('res.company',string = 'Client')
description = fields.Text()
start_date = fields.Date('Start Date')
end_date = fields.Date('End Date')
start_location = fields.Char()
end_location = fields.Char()
driver = fields.Many2one('hr.employee',string = 'Driver')
vehicle = fields.Many2one('fleet.vehicle')


I noticed that in the error message, there's a <data> tag somehow put in automatically by Odoo, it's right under the "arch" field tag. Can this be the cause of the problem? I can't seem to find the solution. Thank you for your help!
0
Avatar
Discard
Avatar
Wojciech Dobrychłop
Author Best Answer

Oops, I forgot to add web_timeline to dependencies in the manifest dependencies. It works now.

0
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
Field not added to model when module installed Solved
views module fields
Avatar
Avatar
1
Sep 23
3629
E-Commerce Exploded View Module
views module ecommerce
Avatar
Avatar
1
Jan 21
8610
how can i get the view of another model in my custom module
views module odoo
Avatar
0
Mar 16
3890
create views in openerp
views module python2.7
Avatar
0
Mar 15
4017
[10.0] Hide cost column in sale order Solved
views module sale.order 10.0
Avatar
Avatar
1
Mar 19
4831
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
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

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

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now