[FIX] entries in calendar view shows if there is no value in the field: (Maintenance Case : 575791)

bzr revid: rgo@tinyerp.com-20120613105806-mw9rslmc4yvxpvus
This commit is contained in:
Ravi Gohil (Open ERP)
2012-06-13 16:28:06 +05:30
parent 068a4e7e5a
commit bcf075b2a5
@@ -239,17 +239,16 @@ openerp.web_calendar.CalendarView = openerp.web.View.extend({
}
},
convert_event: function(evt) {
var self = this;
var date_start = openerp.web.str_to_datetime(evt[this.date_start]),
date_stop = this.date_stop ? openerp.web.str_to_datetime(evt[this.date_stop]) : null,
date_delay = evt[this.date_delay] || 1.0,
res_text = '';
if (this.info_fields) {
res_text = _.map(this.info_fields, function(fld) {
if(evt[fld] instanceof Array)
return evt[fld][1];
return evt[fld];
});
res_text = _(this.info_fields).chain()
.filter(function(fld) { return (self.fields[fld].type != 'boolean') ? !_.isBoolean(evt[fld]) && fld : fld; })
.map(function(fld) { return (evt[fld] instanceof Array) ? evt[fld][1] : evt[fld]; }).value();
}
if (!date_stop && date_delay) {
date_stop = date_start.clone().addHours(date_delay);