|
@ -36,6 +36,7 @@ odoo.define('web_timeline.TimelineView', function (require) { |
|
|
|
|
|
|
|
|
init: function (parent, dataset, view_id, options) { |
|
|
init: function (parent, dataset, view_id, options) { |
|
|
this.permissions = {}; |
|
|
this.permissions = {}; |
|
|
|
|
|
this.grouped_by = false; |
|
|
return this._super.apply(this, arguments); |
|
|
return this._super.apply(this, arguments); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -283,6 +284,7 @@ odoo.define('web_timeline.TimelineView', function (require) { |
|
|
var self = this; |
|
|
var self = this; |
|
|
var data = []; |
|
|
var data = []; |
|
|
var groups = []; |
|
|
var groups = []; |
|
|
|
|
|
this.grouped_by = group_bys; |
|
|
_.each(events, function(event) { |
|
|
_.each(events, function(event) { |
|
|
if (event[self.date_start]){ |
|
|
if (event[self.date_start]){ |
|
|
data.push(self.event_data_transform(event)); |
|
|
data.push(self.event_data_transform(event)); |
|
@ -404,7 +406,9 @@ odoo.define('web_timeline.TimelineView', function (require) { |
|
|
time.auto_date_to_str(start, self.fields[self.fields_view.arch.attrs.date_start].type); |
|
|
time.auto_date_to_str(start, self.fields[self.fields_view.arch.attrs.date_start].type); |
|
|
data[self.fields_view.arch.attrs.date_stop] = |
|
|
data[self.fields_view.arch.attrs.date_stop] = |
|
|
time.auto_date_to_str(end, self.fields[self.fields_view.arch.attrs.date_stop].type); |
|
|
time.auto_date_to_str(end, self.fields[self.fields_view.arch.attrs.date_stop].type); |
|
|
data[self.fields_view.arch.attrs.default_group_by] = group; |
|
|
|
|
|
|
|
|
if (self.grouped_by){ |
|
|
|
|
|
data[self.grouped_by[0]] = group; |
|
|
|
|
|
} |
|
|
var id = item.evt.id; |
|
|
var id = item.evt.id; |
|
|
this.dataset.write(id, data); |
|
|
this.dataset.write(id, data); |
|
|
}, |
|
|
}, |
|
|