[FIX] push date in thunderbird
bzr revid: tfr@openerp.com-20110530100444-65963zryt7t7xzyo
This commit is contained in:
parent
e7bb8477dc
commit
26e28650a2
|
@ -24,6 +24,7 @@ import base64
|
||||||
import email
|
import email
|
||||||
import tools
|
import tools
|
||||||
import binascii
|
import binascii
|
||||||
|
import dateutil.parser
|
||||||
class email_server_tools(osv.osv_memory):
|
class email_server_tools(osv.osv_memory):
|
||||||
_inherit = "email.server.tools"
|
_inherit = "email.server.tools"
|
||||||
def history_message(self, cr, uid, model, res_id, message, context=None):
|
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'))
|
msg['reply'] = self._decode_header(msg_txt.get('Reply-To'))
|
||||||
|
|
||||||
if 'Date' in fields:
|
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:
|
if 'Content-Transfer-Encoding' in fields:
|
||||||
msg['encoding'] = msg_txt.get('Content-Transfer-Encoding')
|
msg['encoding'] = msg_txt.get('Content-Transfer-Encoding')
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1484,6 +1484,7 @@ function upload_archivemail()
|
||||||
strobj.data = 'thunderbird.partner';
|
strobj.data = 'thunderbird.partner';
|
||||||
var resobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
var resobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
||||||
|
|
||||||
|
|
||||||
for(i=0;i<cnt;i++)
|
for(i=0;i<cnt;i++)
|
||||||
{
|
{
|
||||||
var object = list_documents.getSelectedItem(i);
|
var object = list_documents.getSelectedItem(i);
|
||||||
|
@ -1497,7 +1498,6 @@ function upload_archivemail()
|
||||||
var a = ['ref_ids','message'];
|
var a = ['ref_ids','message'];
|
||||||
var b = [ref_ids, eml_string];
|
var b = [ref_ids, eml_string];
|
||||||
var arrofarr = dictcontact(a,b);
|
var arrofarr = dictcontact(a,b);
|
||||||
|
|
||||||
xmlRpcClient.asyncCall(listArchiveHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6);
|
xmlRpcClient.asyncCall(listArchiveHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue