bzr revid: hmo@tinyerp.com-20100817105630-x9qus9wjp894k1xd
This commit is contained in:
Harry (OpenERP)
2010-08-17 16:26:30 +05:30
9 changed files with 77 additions and 64 deletions
+9 -9
View File
@@ -51,21 +51,21 @@ class thunderbird_installer(osv.osv_memory):
'thunderbird' : True,
'name' : 'openerp_plugin.xpi',
'pdf_name' : 'Installation Guide to OpenERP Thunderbid Plug-in.pdf',
'description' : """* Save the Thunderbird plug­in.
* Follows the following step to install Thunderbird plug­in.
1. From Menu Bar of Thunderbird, open Tools ­> Add ons.
2. Click on install button and a browser window appears.
3. Select the plug-in(.xpi file) and click Ok.
4. Software installation window appears and within a short time “Install Now” button will be enabled.
'description' : """* Save the Thunderbird plug-­in.
* Follow the following steps to install Thunderbird plug-­in.
1. From Menu Bar of Thunderbird, open Tools ­> Add-ons.
2. Click install button and a browser window appears.
3. Select the plug-in(openerp_plugin.xpi file) and click Ok.
4. A software installation window appears and within a short time “Install Now” button will be enabled.
5. Click "Install Now".
6. Restart Thunderbird.
* Follow the steps to configure OpenERP in Thunderbird.
1. Go to Tools > OpenERP Synchronization.
1. Go to Tools > OpenERP Configuration.
2. Check data (configured by default).
3. Click "Connect".
4. A message appears with state of your connection.
5. If your connection failed, check if your database is open, and check your data.
6. If you have a good connection, you can start to archive mail in OpenERP. """
5. If your connection failed, check if your database is open, and check your data again.
6. If your database is connected successfully, you can start to archive your e-mail in OpenERP. """
}
thunderbird_installer()
+9 -6
View File
@@ -148,19 +148,22 @@ class thunderbird_partner(osv.osv_memory):
create_id = self.pool.get('res.partner.address').create(cr, user, dictcreate)
return create_id
def history_message(self,cr,uid,vals):
def history_message(self, cr, uid, vals):
dictcreate = dict(vals)
ref_ids = str(dictcreate.get('ref_ids')).split(';')
msg = dictcreate.get('message')
server_tools_pool = self.pool.get('email.server.tools')
res_id = int(dictcreate.get('res_id'))
model = str(dictcreate.get('model'))
message = str(dictcreate.get('message'))
server_tools_pool.history_message(cr,uid,model,res_id,message)
for ref_id in ref_ids:
ref = ref_id.split(',')
model = ref[0]
res_id = int(ref[1])
server_tools_pool.history_message(cr, uid, model, res_id, msg)
return True
def process_email(self,cr,uid,vals):
dictcreate = dict(vals)
model = str(dictcreate.get('model'))
message = str(dictcreate.get('message'))
message = dictcreate.get('message')
return self.pool.get('email.server.tools').process_email(cr, uid, model, message, attach=True, context=None)
def search_contact(self, cr, user, vals):
Binary file not shown.
@@ -1,8 +1,6 @@
function config_close()
{
//window.close("chrome://openerp_plugin/content/config_change.xul", "", "chrome");
//ksa
window.close("chrome://openerp_plugin/content/config_change.xul", "", "chrome");
window.open("chrome://openerp_plugin/content/config.xul", "", "chrome");
}
@@ -62,13 +60,10 @@ function config_ok()
}
setServer("http://"+document.getElementById('txtcurl').value +":" + document.getElementById('txtcport').value);
window.close("chrome://openerp_plugin/content/config_change.xul", "", "chrome");
//ksa
window.open("chrome://openerp_plugin/content/config.xul", "", "chrome");
}
function openConfigChange()
{
//window.open("chrome://openerp_plugin/content/config_change.xul", "", "chrome");
//ksa
window.close("chrome://openerp_plugin/content/config.xul", "", "chrome");
window.open("chrome://openerp_plugin/content/config_change.xul", "", "chrome");
}
@@ -144,7 +139,7 @@ function deleteDocument(){
document.getElementById("listObjectListBox").removeItemAt(document.getElementById("listObjectListBox").selectedIndex)
}
else{
alert("No Document Selected");
alert("Please Select Any One Document ");
}
}
@@ -27,7 +27,7 @@
<groupbox id="address">
<hbox>
<caption label="&postaladdress.value;" />
<spacer width="300"/>
<spacer width="290"/>
<vbox>
<caption label="&communication.value;" />
</vbox>
@@ -16,7 +16,7 @@
<hbox id="root">
<vbox width="400">
<groupbox height="30" id="existsobjectgroup" width="400">
<caption label="&gptinyobj.label;" />
<caption label="&gptinyobj.label;"/>
<hbox>
<label id="lblsearch" control="txtvalueobj" value="&search.label;"/>
<textbox id="txtvalueobj" size="30"/>
@@ -26,8 +26,7 @@
</vbox>
<hbox align="center">
<image src='chrome://tiny_plugin/skin/perform.gif'/>
<checkbox id="cbxselectall" oncommand="selectAllCheckbox();" checked="false"/>
<caption label="&cbxselectall.label;" />
<checkbox id="cbxselectall" oncommand="selectAllCheckbox();" label="&cbxselectall.label;" checked="false"/>
<spacer width="10"/>
</hbox>
@@ -54,7 +53,6 @@
<groupbox id="newobjectgroup" align="center" width="170" height="375">
<caption label="&newobject.label;" />
<hbox>
<label id="lblex" value=" "/>
<label id="lblex3" control="section" value="&object.label;"/>
<menulist id="section" width="150">
<menupopup>
@@ -81,7 +79,7 @@
<label id="lblex" value=" "/>
<label id="lblex" value=" "/>
<hbox align="right">
<spacer width="330"/>
<spacer width="300"/>
<button label="&close.label;" accesskey="l" image="&imagecancel.value;" oncommand="win_close();"/>
</hbox>
@@ -1,6 +1,20 @@
/**
* Global instance stored here
*/
/************************************************************
* OpenERP, Open Source Management Solution
* Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
***************************************************************/
var xmlRpcClient;
@@ -151,7 +165,7 @@ var rpc= {
function handler_function( result ) {
if ( rpc.onfault( result ) ) { alert( result[0] + "\n" + result[1] ); return; }
else{
alert("got result>>>>"+result)
alert("got result"+result)
}
}
@@ -1079,7 +1093,7 @@ var listSearchCheckboxHandler = {
var count = arrMethodList.Count();
var close=0;
if(count == 0 && popup_display != "no"){
alert("No records Found");
alert("No Records Found");
return false;
}
else if(count ==2 )
@@ -1124,10 +1138,10 @@ var listSearchCheckboxHandler = {
arrDataPair[0] = er_val[0].QueryElementAt(j, Components.interfaces.nsISupportsCString)
arrSearchList1[j]=arrDataPair;
}
alert( arrSearchList1 + " model not exists")
alert( arrSearchList1 + " Model not exists")
if (close == 1)
{
alert("No records Found");
alert("No Records Found");
return false;
}
}
@@ -1197,7 +1211,7 @@ function searchCheckbox()
{
var checkboxlist = getnamesearch();
if(checkboxlist.length == 0){
alert("Select One or More Document");
alert("Please Select One or More Document");
return false;
}
var branchobj = getPref();
@@ -1387,34 +1401,38 @@ function upload_archivemail()
list_documents = document.getElementById('listSearchBox')
var context = []
var cnt = list_documents.selectedCount
var ref_ids = "";
var branchobj = getPref();
setServerService('xmlrpc/object');
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
var xmlRpcClient = getXmlRpc();
var strDbName = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strDbName.data = branchobj.getCharPref("serverdbname");
var struids = xmlRpcClient.createType(xmlRpcClient.INT,{});
struids.data = branchobj.getIntPref('userid');
var strpass = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strpass.data = branchobj.getCharPref("password");
var strmethod = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strmethod.data = 'history_message';
var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strobj.data = 'thunderbird.partner';
var resobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
for(i=0;i<cnt;i++)
{
var object = list_documents.getSelectedItem(i);
var eml_string = parse_eml();
var model = object.label;
var res_id = object.value;
var branchobj = getPref();
setServerService('xmlrpc/object');
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
var xmlRpcClient = getXmlRpc();
var strDbName = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strDbName.data = branchobj.getCharPref("serverdbname");
var struids = xmlRpcClient.createType(xmlRpcClient.INT,{});
struids.data = branchobj.getIntPref('userid');
var strpass = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strpass.data = branchobj.getCharPref("password");
var strmethod = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strmethod.data = 'history_message';
var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strobj.data = 'thunderbird.partner';
var resobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
var a = ['model', 'res_id','message'];
var b = [model, res_id,eml_string];
var arrofarr = dictcontact(a,b)
xmlRpcClient.asyncCall(listArchiveHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6);
alert("Mail Archive Successfully");
}
window.close();
ref_ids += object.label;
ref_ids += ",";
ref_ids += object.value;
if (i < cnt-1){ref_ids += ";";}
}
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);
alert("Mail Archived Successfully");
window.close();
}
@@ -1444,7 +1462,7 @@ function create_archivemail(){
var b = [object, eml_string];
var arrofarr = dictcontact(a,b);
xmlRpcClient.asyncCall(listArchiveHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6);
alert("Mail Archive Successfully");
alert("Document Created Successfully");
}
window.close();
}
@@ -1660,7 +1678,7 @@ var listLoginHandler = {
if(login.type == 12){
login = result.QueryInterface(Components.interfaces.nsISupportsPRInt32)
setUserId(login.data);
alert('Successful Login To OpenERP');
alert('Successfully Login To OpenERP');
window.close();
}
else{
@@ -1680,7 +1698,7 @@ var listLoginHandler = {
function testConnection(){
if (getconnect_server() == "false")
{
alert("No Server Running..."+" "+getServer())
alert("Server is Not Running...Please check it!!"+" "+getServer())
return false;
}
if (getDBList()=="false")
@@ -1764,7 +1782,6 @@ var listCreatePartnerHandler = {
onResult: function(client, context, result) {
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
var createId = result.QueryInterface(Components.interfaces.nsISupportsPRInt32);
if(typeof(createId.data) == 'number' && createId!=0){
window.close();
}
+1 -1
View File
@@ -92,7 +92,7 @@
<separator string="" colspan="4"/>
<group colspan="4">
<label align="0.0" string="" colspan="3"/>
<button colspan="1" icon="gtk-cancel" special="cancel" string="Cancel"/>
<button colspan="1" icon="gtk-cancel" special="cancel" string="Close"/>
</group>
</form>
</field>