3
0
Fork 0

[FIX] Travis

16.0
Murtaza Mithaiwala 2021-03-15 18:01:47 +05:30 committed by anjeel.haria
parent 6e0e29a3dd
commit e86e087980
6 changed files with 68 additions and 71 deletions

View File

@ -4,7 +4,7 @@
{ {
"name": "Web timeline", "name": "Web timeline",
"summary": "Interactive visualization chart to show events in time", "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", "development_status": "Production/Stable",
"author": "ACSONE SA/NV, " "author": "ACSONE SA/NV, "
"Tecnativa, " "Tecnativa, "

View File

@ -68,7 +68,7 @@ odoo.define("web_timeline.TimelineController", function(require) {
domain: domains, domain: domains,
}, },
context: this.getSession().user_context, context: this.getSession().user_context,
}).then(data => }).then((data) =>
this.renderer.on_data_loaded( this.renderer.on_data_loaded(
data, data,
n_group_bys, n_group_bys,
@ -278,7 +278,7 @@ odoo.define("web_timeline.TimelineController", function(require) {
res_id: null, res_id: null,
context: _.extend(default_context, this.context), context: _.extend(default_context, this.context),
view_id: Number(this.open_popup_action), view_id: Number(this.open_popup_action),
on_saved: record => { on_saved: (record) => {
this.create_completed([record.res_id]); this.create_completed([record.res_id]);
}, },
}) })
@ -303,7 +303,7 @@ odoo.define("web_timeline.TimelineController", function(require) {
method: "read", method: "read",
args: [id, this.model.fieldNames], args: [id, this.model.fieldNames],
context: this.context, context: this.context,
}).then(records => { }).then((records) => {
var new_event = this.renderer.event_data_transform(records[0]); var new_event = this.renderer.event_data_transform(records[0]);
var items = this.renderer.timeline.itemsData; var items = this.renderer.timeline.itemsData;
items.add(new_event); items.add(new_event);

View File

@ -58,7 +58,7 @@ odoo.define("web_timeline.TimelineModel", function(require) {
context: this.data.context, context: this.data.context,
fields: this.fieldNames, fields: this.fieldNames,
domain: this.data.domain, domain: this.data.domain,
}).then(events => { }).then((events) => {
this.data.data = events; this.data.data = events;
this.data.rights = { this.data.rights = {
unlink: this.unlink_right, unlink: this.unlink_right,

View File

@ -221,7 +221,7 @@ odoo.define("web_timeline.TimelineRenderer", function(require) {
this.qweb = new QWeb(session.debug, {_s: session.origin}, false); this.qweb = new QWeb(session.debug, {_s: session.origin}, false);
if (this.arch.children.length) { if (this.arch.children.length) {
const tmpl = utils.json_node_to_xml( 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); this.qweb.add_template(tmpl);
} }
@ -324,11 +324,11 @@ odoo.define("web_timeline.TimelineRenderer", function(require) {
method: "name_get", method: "name_get",
args: [ids], args: [ids],
context: this.getSession().user_context, context: this.getSession().user_context,
}).then(names => { }).then((names) => {
const nevents = _.map(events, event => const nevents = _.map(events, (event) =>
_.extend( _.extend(
{ {
__name: _.detect(names, name => name[0] === event.id)[1], __name: _.detect(names, (name) => name[0] === event.id)[1],
}, },
event event
) )
@ -383,7 +383,7 @@ odoo.define("web_timeline.TimelineRenderer", function(require) {
if (group_name instanceof Array) { if (group_name instanceof Array) {
const group = _.find( const group = _.find(
groups, groups,
existing_group => existing_group.id === group_name[0] (existing_group) => existing_group.id === group_name[0]
); );
if (_.isUndefined(group)) { if (_.isUndefined(group)) {
groups.push({ groups.push({
@ -433,10 +433,7 @@ odoo.define("web_timeline.TimelineRenderer", function(require) {
} }
if (!date_stop && date_delay) { if (!date_stop && date_delay) {
date_stop = date_start date_stop = date_start.clone().add(date_delay, "hours").toDate();
.clone()
.add(date_delay, "hours")
.toDate();
} }
return [date_start, date_stop]; return [date_start, date_stop];

View File

@ -65,8 +65,8 @@ odoo.define("web_timeline.TimelineView", function(require) {
} }
const archFieldNames = _.map( const archFieldNames = _.map(
_.filter(this.arch.children, item => item.tag === "field"), _.filter(this.arch.children, (item) => item.tag === "field"),
item => item.attrs.name (item) => item.attrs.name
); );
fieldNames = _.union(fieldNames, archFieldNames); fieldNames = _.union(fieldNames, archFieldNames);
@ -163,7 +163,7 @@ odoo.define("web_timeline.TimelineView", function(require) {
return _(this.arch.attrs.colors.split(";")) return _(this.arch.attrs.colors.split(";"))
.chain() .chain()
.compact() .compact()
.map(color_pair => { .map((color_pair) => {
const pair = color_pair.split(":"); const pair = color_pair.split(":");
const color = pair[0]; const color = pair[0];
const expr = pair[1]; const expr = pair[1];