[IMP]: Improvement in archive mail
bzr revid: ksa@tinyerp.co.in-20100920101533-043zv54yk54b4f8i
This commit is contained in:
parent
4664b3433c
commit
b3bc28d3df
|
@ -156,20 +156,19 @@ class thunderbird_partner(osv.osv_memory):
|
|||
server_tools_pool = self.pool.get('email.server.tools')
|
||||
message_id = msg.get('message-id', False)
|
||||
msg_pool = self.pool.get('mailgate.message')
|
||||
msg_ids = msg_pool.search(cr, uid, [('message_id','=',message_id)])
|
||||
|
||||
res = {}
|
||||
res_ids = []
|
||||
if msg_ids and len(msg_ids):
|
||||
return 0
|
||||
|
||||
for ref_id in ref_ids:
|
||||
msg_new = dictcreate.get('message')
|
||||
ref = ref_id.split(',')
|
||||
model = ref[0]
|
||||
model_obj = self.pool.get(model)
|
||||
model_data = model_obj.search(cr, uid,[('name', 'ilike', ref[1])])
|
||||
if model_data:
|
||||
res_id = int(model_data[0])
|
||||
res_id = int(ref[1])
|
||||
if message_id:
|
||||
msg_ids = msg_pool.search(cr, uid, [('message_id','=',message_id),('res_id','=',res_id),('model','=',model)])
|
||||
if msg_ids and len(msg_ids):
|
||||
continue
|
||||
server_tools_pool.history_message(cr, uid, model, res_id, msg_new)
|
||||
res_ids.append(res_id)
|
||||
return len(res_ids)
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1220,7 +1220,7 @@ var listSearchCheckboxHandler = {
|
|||
listcell.setAttribute("height",12);
|
||||
listcell.setAttribute("label",arrFinalList[i][j][1]); //stores the name ofthe record
|
||||
listItem.appendChild(listcell);
|
||||
listItem.value = arrFinalList[i][j][1]; //stores the name of the record
|
||||
listItem.value = arrFinalList[i][j][0]; //stores the id of the record
|
||||
listItem.label = arr1[i]; // stores the value of the object
|
||||
cmbSearchList.appendChild(listItem);
|
||||
}
|
||||
|
@ -1399,13 +1399,13 @@ var listArchiveHandler = {
|
|||
}
|
||||
else if (createId<0)
|
||||
{
|
||||
alert("sorry Mail is not Archived to" +" " + ":" + " "+ list_documents.value);
|
||||
alert("sorry Mail is not Archived");
|
||||
|
||||
}
|
||||
|
||||
else if (createId>=1)
|
||||
{
|
||||
alert("Mail Archived Successfully to" +" " + ":" + " "+ list_documents.value);
|
||||
alert("Mail Archived Successfully");
|
||||
}
|
||||
window.close();
|
||||
|
||||
|
@ -1491,6 +1491,24 @@ function upload_archivemail()
|
|||
|
||||
}
|
||||
|
||||
var listArchiveDocumentHandler = {
|
||||
onResult: function(client, context, result) {
|
||||
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
|
||||
var createId = result.QueryInterface(Components.interfaces.nsISupportsPRInt32);
|
||||
var popup = document.getElementById("section").selectedItem;
|
||||
alert("Document Created Successfully For " +" " + ":" + " "+ popup.label);
|
||||
window.close();
|
||||
|
||||
},
|
||||
onFault: function (client, ctxt, fault) {
|
||||
|
||||
},
|
||||
|
||||
onError: function (client, ctxt, status, errorMsg) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function create_archivemail(){
|
||||
var popup = document.getElementById("section").selectedItem;
|
||||
// a <menupopup> element
|
||||
|
@ -1517,10 +1535,10 @@ function create_archivemail(){
|
|||
var a = ['model', 'message'];
|
||||
var b = [object, eml_string];
|
||||
var arrofarr = dictcontact(a,b);
|
||||
xmlRpcClient.asyncCall(listArchiveHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6);
|
||||
alert("Document Created Successfully For " +" " + ":" + " "+ popup.label);
|
||||
xmlRpcClient.asyncCall(listArchiveDocumentHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6);
|
||||
//alert("Document Created Successfully For " +" " + ":" + " "+ popup.label);
|
||||
}
|
||||
window.close();
|
||||
//window.close();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue