[FIX] push date in thunderbird

bzr revid: tfr@openerp.com-20110530100444-65963zryt7t7xzyo
This commit is contained in:
tfr@openerp.com 2011-05-30 12:04:44 +02:00
parent e7bb8477dc
commit 26e28650a2
4 changed files with 4 additions and 2 deletions

View File

@ -24,6 +24,7 @@ import base64
import email
import tools
import binascii
import dateutil.parser
class email_server_tools(osv.osv_memory):
_inherit = "email.server.tools"
def history_message(self, cr, uid, model, res_id, message, context=None):
@ -73,7 +74,8 @@ class email_server_tools(osv.osv_memory):
msg['reply'] = self._decode_header(msg_txt.get('Reply-To'))
if 'Date' in fields:
msg['date'] = self._decode_header(msg_txt.get('Date'))
date = self._decode_header(msg_txt.get('Date'))
msg['date'] = dateutil.parser.parse(date).strftime("%Y-%m-%d %H:%M:%S")
if 'Content-Transfer-Encoding' in fields:
msg['encoding'] = msg_txt.get('Content-Transfer-Encoding')

View File

@ -1484,6 +1484,7 @@ function upload_archivemail()
strobj.data = 'thunderbird.partner';
var resobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
for(i=0;i<cnt;i++)
{
var object = list_documents.getSelectedItem(i);
@ -1497,7 +1498,6 @@ function upload_archivemail()
var a = ['ref_ids','message'];
var b = [ref_ids, eml_string];
var arrofarr = dictcontact(a,b);
xmlRpcClient.asyncCall(listArchiveHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6);
}