[IMP] Use openerp.web.auto_str_to_date
bzr revid: fme@openerp.com-20111018132813-3ydxoh0zg4emh55r
This commit is contained in:
parent
5dd738e2f5
commit
4bd833ec8b
|
@ -180,11 +180,11 @@ openerp.web_calendar.CalendarView = openerp.web.View.extend({
|
|||
}
|
||||
}
|
||||
|
||||
if (this.fields[this.date_start]['type'] == 'date' && /^\d\d\d\d-\d\d-\d\d$/.exec(evt[this.date_start])) {
|
||||
evt[this.date_start] = openerp.web.str_to_date(evt[this.date_start]).set({hour: 9}).toString('yyyy-MM-dd HH:mm:ss');
|
||||
if (this.fields[this.date_start]['type'] == 'date') {
|
||||
evt[this.date_start] = openerp.web.auto_str_to_date(evt[this.date_start]).set({hour: 9}).toString('yyyy-MM-dd HH:mm:ss');
|
||||
}
|
||||
if (this.date_stop && evt[this.date_stop] && this.fields[this.date_stop]['type'] == 'date') {
|
||||
evt[this.date_stop] = openerp.web.str_to_date(evt[this.date_stop]).set({hour: 17}).toString('yyyy-MM-dd HH:mm:ss');
|
||||
evt[this.date_stop] = openerp.web.auto_str_to_date(evt[this.date_stop]).set({hour: 17}).toString('yyyy-MM-dd HH:mm:ss');
|
||||
}
|
||||
res_events.push(this.convert_event(evt));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue