[IMP]: Improvement in thunderbird for open document
bzr revid: ksa@tinyerp.co.in-20100924135823-q9052yk4e29nyfvq
This commit is contained in:
parent
17828bf0d9
commit
b76a93507b
|
@ -184,7 +184,8 @@ class thunderbird_partner(osv.osv_memory):
|
|||
def search_message(self, cr, uid, message, context=None):
|
||||
#@param message: string of mail which is read from EML File
|
||||
#@return model,res_id
|
||||
print "search message"
|
||||
dictcreate = dict(message)
|
||||
message = dictcreate.get('message')
|
||||
msg_pool = self.pool.get('mailgate.message')
|
||||
msg = self.pool.get('email.server.tools').parse_message(message)
|
||||
message_id = msg.get('message-id', False)
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -197,9 +197,10 @@ var openPartnerHandler = {
|
|||
var urlport = weburl+':'+webport
|
||||
|
||||
if (parseInt(partner_id) > 0){
|
||||
var t = urlport + "/openerp/form/view?model=res.partner&id="+partner_id
|
||||
window.open(t)
|
||||
|
||||
alert(partner_id)
|
||||
var t = urlport + "/form/view?model=res.partner&id="+partner_id;
|
||||
window.open(t);
|
||||
|
||||
}
|
||||
else{
|
||||
alert("Partner is not Available.");
|
||||
|
@ -292,19 +293,19 @@ function open_partner()
|
|||
}
|
||||
searchPartner(senderemail);
|
||||
}
|
||||
|
||||
var listDocumentHandler = {
|
||||
onResult: function(client, context, result) {
|
||||
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
|
||||
var res = result.QueryInterface(Components.interfaces.nsISupportsArray);
|
||||
var res = result.QueryInterface(Components.interfaces.nsISupportsArray);
|
||||
res_id = res.QueryElementAt(1, Components.interfaces.nsISupportsPRInt32);
|
||||
model = res.QueryElementAt(0, Components.interfaces.nsISupportsCString);
|
||||
weburl = getWebServerURL()
|
||||
if (weburl == false){
|
||||
weburl = 'http://localhost:8080'
|
||||
}
|
||||
var branchobj = getPref();
|
||||
db_name = branchobj.getCharPref("serverdbname");
|
||||
window.open(weburl + "/model=" + model +"&id=" + res_id)
|
||||
model = res.QueryElementAt(0, Components.interfaces.nsISupportsCString);
|
||||
weburl = getWebServerURL();
|
||||
webport = getwebPort();
|
||||
var urlport = weburl+':'+webport
|
||||
var t = urlport + "/form/view?model=" + model +"&id=" + res_id
|
||||
alert(t)
|
||||
window.open(t);
|
||||
},
|
||||
onFault: function (client, ctxt, fault) {
|
||||
|
||||
|
@ -313,7 +314,9 @@ var listDocumentHandler = {
|
|||
onError: function (client, ctxt, status, errorMsg) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function open_document()
|
||||
{
|
||||
if (check() == false){
|
||||
|
@ -355,12 +358,14 @@ function open_document()
|
|||
strmethod.data = 'search_message';
|
||||
var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
||||
strobj.data = 'thunderbird.partner';
|
||||
var eml_string = parse_eml()
|
||||
var a = ['model', 'message'];
|
||||
var b = [object, eml_string];
|
||||
var arrofarr = dictcontact(a,b);
|
||||
var eml_string = parse_eml()
|
||||
var a = ['message'];
|
||||
var b = [eml_string];
|
||||
var arrofarr = dictcontact(a,b);
|
||||
xmlRpcClient.asyncCall(listDocumentHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function open_contact()
|
||||
{
|
||||
if (check() == false){
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<toolbarbutton id="GA-button2"
|
||||
class="toolbarbutton-1"
|
||||
image="&partnericon.value;"
|
||||
label= "Open Partner"
|
||||
label= "Open Partner"
|
||||
oncommand="open_partner();"
|
||||
/>
|
||||
</toolbarpalette>
|
||||
|
|
|
@ -1489,9 +1489,7 @@ function upload_archivemail()
|
|||
var arrofarr = dictcontact(a,b);
|
||||
|
||||
xmlRpcClient.asyncCall(listArchiveHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6);
|
||||
// alert("Mail Archived Successfully to" +" " + ":" + " "+ list_documents.value);
|
||||
//window.close();
|
||||
|
||||
|
||||
}
|
||||
|
||||
var listArchiveDocumentHandler = {
|
||||
|
|
Loading…
Reference in New Issue