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:
And the model that I'm trying to set into the timeline: