mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[MIG] web_timeline: Migration to 12.0
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user