[FIX] mail: Date.parse with a split for allow date format with micro sec

bzr revid: chm@openerp.com-20130201084013-eia7803w15is8ywt
This commit is contained in:
Christophe Matthieu 2013-02-01 09:40:13 +01:00
parent 925e7456b1
commit 4e1f2c81ea
1 changed files with 1 additions and 1 deletions

View File

@ -243,7 +243,7 @@ openerp.mail = function (session) {
/* Convert date, timerelative and avatar in displayable data. */
format_data: function () {
//formating and add some fields for render
if (this.date && new Date().getTime()-Date.parse(this.date).getTime() < 7*24*60*60*1000) {
if (this.date && new Date().getTime()-Date.parse((this.date+'').split('.')[0]).getTime() < 7*24*60*60*1000) {
this.timerelative = $.timeago(this.date+"Z");
}
if (this.type == 'email' && (!this.author_id || !this.author_id[0])) {