[MIG] web_timeline: Migration to 12.0

This commit is contained in:
tarteo
2018-10-23 11:27:20 +02:00
committed by CarlosRoca13
parent 990ef1868f
commit 2ffcacd690
13 changed files with 1111 additions and 716 deletions

View File

@@ -39,11 +39,15 @@ odoo.define('web_timeline.TimelineView', function (require) {
Renderer: TimelineRenderer,
},
/**
* @constructor
* @override
*/
init: function (viewInfo, params) {
this._super.apply(this, arguments);
var self = this;
this.timeline = false;
this.arch = viewInfo.arch;
this.arch = this.rendererParams.arch;
var attrs = this.arch.attrs;
this.fields = viewInfo.fields;
this.modelName = this.controllerParams.modelName;
@@ -144,6 +148,9 @@ odoo.define('web_timeline.TimelineView', function (require) {
return this;
},
/**
* Order function for groups.
*/
group_order: function (grp1, grp2) {
// display non grouped elements first
if (grp1.id === -1) {
@@ -156,6 +163,11 @@ odoo.define('web_timeline.TimelineView', function (require) {
},
/**
* Parse the colors attribute.
*
* @private
*/
parse_colors: function () {
if (this.arch.attrs.colors) {
this.colors = _(this.arch.attrs.colors.split(';')).chain().compact().map(function (color_pair) {