forked from Techsystech/web
[FIX] Travis
parent
6e0e29a3dd
commit
e86e087980
|
@ -4,7 +4,7 @@
|
|||
{
|
||||
"name": "Web timeline",
|
||||
"summary": "Interactive visualization chart to show events in time",
|
||||
"version": "13.0.1.1.1",
|
||||
"version": "14.0.1.0.0",
|
||||
"development_status": "Production/Stable",
|
||||
"author": "ACSONE SA/NV, "
|
||||
"Tecnativa, "
|
||||
|
|
|
@ -68,7 +68,7 @@ odoo.define("web_timeline.TimelineController", function(require) {
|
|||
domain: domains,
|
||||
},
|
||||
context: this.getSession().user_context,
|
||||
}).then(data =>
|
||||
}).then((data) =>
|
||||
this.renderer.on_data_loaded(
|
||||
data,
|
||||
n_group_bys,
|
||||
|
@ -278,7 +278,7 @@ odoo.define("web_timeline.TimelineController", function(require) {
|
|||
res_id: null,
|
||||
context: _.extend(default_context, this.context),
|
||||
view_id: Number(this.open_popup_action),
|
||||
on_saved: record => {
|
||||
on_saved: (record) => {
|
||||
this.create_completed([record.res_id]);
|
||||
},
|
||||
})
|
||||
|
@ -303,7 +303,7 @@ odoo.define("web_timeline.TimelineController", function(require) {
|
|||
method: "read",
|
||||
args: [id, this.model.fieldNames],
|
||||
context: this.context,
|
||||
}).then(records => {
|
||||
}).then((records) => {
|
||||
var new_event = this.renderer.event_data_transform(records[0]);
|
||||
var items = this.renderer.timeline.itemsData;
|
||||
items.add(new_event);
|
||||
|
|
|
@ -58,7 +58,7 @@ odoo.define("web_timeline.TimelineModel", function(require) {
|
|||
context: this.data.context,
|
||||
fields: this.fieldNames,
|
||||
domain: this.data.domain,
|
||||
}).then(events => {
|
||||
}).then((events) => {
|
||||
this.data.data = events;
|
||||
this.data.rights = {
|
||||
unlink: this.unlink_right,
|
||||
|
|
|
@ -221,7 +221,7 @@ odoo.define("web_timeline.TimelineRenderer", function(require) {
|
|||
this.qweb = new QWeb(session.debug, {_s: session.origin}, false);
|
||||
if (this.arch.children.length) {
|
||||
const tmpl = utils.json_node_to_xml(
|
||||
_.filter(this.arch.children, item => item.tag === "templates")[0]
|
||||
_.filter(this.arch.children, (item) => item.tag === "templates")[0]
|
||||
);
|
||||
this.qweb.add_template(tmpl);
|
||||
}
|
||||
|
@ -324,11 +324,11 @@ odoo.define("web_timeline.TimelineRenderer", function(require) {
|
|||
method: "name_get",
|
||||
args: [ids],
|
||||
context: this.getSession().user_context,
|
||||
}).then(names => {
|
||||
const nevents = _.map(events, event =>
|
||||
}).then((names) => {
|
||||
const nevents = _.map(events, (event) =>
|
||||
_.extend(
|
||||
{
|
||||
__name: _.detect(names, name => name[0] === event.id)[1],
|
||||
__name: _.detect(names, (name) => name[0] === event.id)[1],
|
||||
},
|
||||
event
|
||||
)
|
||||
|
@ -383,7 +383,7 @@ odoo.define("web_timeline.TimelineRenderer", function(require) {
|
|||
if (group_name instanceof Array) {
|
||||
const group = _.find(
|
||||
groups,
|
||||
existing_group => existing_group.id === group_name[0]
|
||||
(existing_group) => existing_group.id === group_name[0]
|
||||
);
|
||||
if (_.isUndefined(group)) {
|
||||
groups.push({
|
||||
|
@ -433,10 +433,7 @@ odoo.define("web_timeline.TimelineRenderer", function(require) {
|
|||
}
|
||||
|
||||
if (!date_stop && date_delay) {
|
||||
date_stop = date_start
|
||||
.clone()
|
||||
.add(date_delay, "hours")
|
||||
.toDate();
|
||||
date_stop = date_start.clone().add(date_delay, "hours").toDate();
|
||||
}
|
||||
|
||||
return [date_start, date_stop];
|
||||
|
|
|
@ -65,8 +65,8 @@ odoo.define("web_timeline.TimelineView", function(require) {
|
|||
}
|
||||
|
||||
const archFieldNames = _.map(
|
||||
_.filter(this.arch.children, item => item.tag === "field"),
|
||||
item => item.attrs.name
|
||||
_.filter(this.arch.children, (item) => item.tag === "field"),
|
||||
(item) => item.attrs.name
|
||||
);
|
||||
fieldNames = _.union(fieldNames, archFieldNames);
|
||||
|
||||
|
@ -163,7 +163,7 @@ odoo.define("web_timeline.TimelineView", function(require) {
|
|||
return _(this.arch.attrs.colors.split(";"))
|
||||
.chain()
|
||||
.compact()
|
||||
.map(color_pair => {
|
||||
.map((color_pair) => {
|
||||
const pair = color_pair.split(":");
|
||||
const color = pair[0];
|
||||
const expr = pair[1];
|
||||
|
|
Loading…
Reference in New Issue