[FIX] web_calendar: safer evaluation of color filters

In some loading cases, the all_filters may not be loaded yet so fail at the evaluation.
Making it safer and check the content.
opw 659052
This commit is contained in:
Martin Trigaux
2015-12-09 16:11:00 +01:00
parent c01c10c4bd
commit e029724403
@@ -630,7 +630,7 @@ var CalendarView = View.extend({
r.className = 'o_calendar_color_'+ this.get_color(color_key);
}
} else { // if form all, get color -1
r.className = 'o_calendar_color_'+ self.all_filters[-1].color;
r.className = 'o_calendar_color_'+ self.all_filters[-1] ? self.all_filters[-1].color : 1;
}
return r;
},