summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2011-02-01 15:25:28 +0100
committerOlivier Dony <odo@openerp.com>2011-02-01 15:25:28 +0100
commit1da43ed8ba2ea58bd9cfa8cea88f16baf249b7ef (patch)
treee1fe42eccd2ee0ad42485e2047fda56c1f0651ab
parent3293581e242690e800a97bedf626b3a3105578b9 (diff)
parentc1b440143bcbb0aac8451316413d2029d23f2754 (diff)
[MERGE] merged latest bugfixes from 6.0 into trunk (up to rev 4375)
bzr revid: odo@openerp.com-20110201142528-5w9ns20flxmetf3i
-rw-r--r--addons/account/invoice.py8
-rw-r--r--addons/account_payment/account_payment.py4
-rw-r--r--addons/account_payment/account_payment_view.xml2
-rw-r--r--addons/base_action_rule/base_action_rule.py2
-rw-r--r--addons/crm/crm_view.xml6
-rw-r--r--addons/crm/wizard/crm_lead_to_opportunity.py6
-rw-r--r--addons/hr_attendance/hr_attendance.py2
-rw-r--r--addons/product/product.py2
-rw-r--r--addons/project_planning/project_planning_demo.xml2
-rw-r--r--addons/thunderbird/plugin/openerp_plugin.xpibin181530 -> 154780 bytes
-rw-r--r--addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jarbin86133 -> 71525 bytes
-rw-r--r--addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/config.js330
-rw-r--r--addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/config_change_web.xul28
-rw-r--r--addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js19
-rw-r--r--addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/locale/en-US/config_change_web.dtd4
15 files changed, 218 insertions, 197 deletions
diff --git a/addons/account/invoice.py b/addons/account/invoice.py
index 64634e34a96..fcaeb42c01f 100644
--- a/addons/account/invoice.py
+++ b/addons/account/invoice.py
@@ -94,7 +94,7 @@ class account_invoice(osv.osv):
if invoice.move_id:
for m in invoice.move_id.line_id:
if m.account_id.type in ('receivable','payable'):
- result[invoice.id] = m.amount_residual_currency
+ result[invoice.id] += m.amount_residual_currency
return result
# Give Journal Items related to the payment reconciled to this invoice
@@ -353,6 +353,8 @@ class account_invoice(osv.osv):
raise orm.except_orm(_('Unknown Error'), str(e))
def confirm_paid(self, cr, uid, ids, context=None):
+ if context is None:
+ context = {}
self.write(cr, uid, ids, {'state':'paid'}, context=context)
for inv_id, name in self.name_get(cr, uid, ids, context=context):
message = _("Invoice '%s' is paid.") % name
@@ -360,6 +362,8 @@ class account_invoice(osv.osv):
return True
def unlink(self, cr, uid, ids, context=None):
+ if context is None:
+ context = {}
invoices = self.read(cr, uid, ids, ['state'], context=context)
unlink_ids = []
for t in invoices:
@@ -598,6 +602,8 @@ class account_invoice(osv.osv):
return res
def copy(self, cr, uid, id, default={}, context=None):
+ if context is None:
+ context = {}
default.update({
'state':'draft',
'number':False,
diff --git a/addons/account_payment/account_payment.py b/addons/account_payment/account_payment.py
index d5858d94f80..138be103f2e 100644
--- a/addons/account_payment/account_payment.py
+++ b/addons/account_payment/account_payment.py
@@ -306,7 +306,7 @@ class payment_line(osv.osv):
if id.move_line_id:
res[id.id] = id.move_line_id.date_maturity
else:
- res[id.id] = ""
+ res[id.id] = False
return res
def _get_ml_created_date(self, cr, uid, ids, *a):
@@ -315,7 +315,7 @@ class payment_line(osv.osv):
if id.move_line_id:
res[id.id] = id.move_line_id.date_created
else:
- res[id.id] = ""
+ res[id.id] = False
return res
_columns = {
diff --git a/addons/account_payment/account_payment_view.xml b/addons/account_payment/account_payment_view.xml
index 5c935f188fb..b829748cb93 100644
--- a/addons/account_payment/account_payment_view.xml
+++ b/addons/account_payment/account_payment_view.xml
@@ -108,7 +108,7 @@
<field name="date_scheduled" select="1" attrs="{'readonly':[('date_prefered','!=','fixed')]}" />
<button colspan="2" name="%(action_create_payment_order)d" string="Select Invoices to Pay" type="action" attrs="{'invisible':[('state','=','done')]}" icon="gtk-find"/>
</group>
- <field name="line_ids" colspan="4" widget="one2many_list" nolabel="1" default_get="{'order_id': active_id}" >
+ <field name="line_ids" colspan="4" widget="one2many_list" nolabel="1" default_get="{'order_id': active_id or False}" >
<form string="Payment Line">
<notebook>
<page string="Payment">
diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py
index d528aaae28e..2a4e2c0e4e1 100644
--- a/addons/base_action_rule/base_action_rule.py
+++ b/addons/base_action_rule/base_action_rule.py
@@ -179,6 +179,8 @@ the rule to mark CC(mail to any other person defined in actions)."),
if context is None:
context = {}
def make_call_old(cr, uid, ids, vals, context=context):
+ if context is None:
+ context = {}
if isinstance(ids, (str, int, long)):
ids = [ids]
if not context.get('action'):
diff --git a/addons/crm/crm_view.xml b/addons/crm/crm_view.xml
index bd0b56facc0..ff9c339b568 100644
--- a/addons/crm/crm_view.xml
+++ b/addons/crm/crm_view.xml
@@ -124,11 +124,13 @@
<form string="Stage">
<separator string="Stage Definition" colspan="4"/>
<field name="name" select="1"/>
- <field name="type" invisible="1" />
+ <field name="type" groups="base.group_extended" />
<field name="sequence"/>
<field name="probability"/>
- <field name="on_change"/>
+ <group colspan="4" col="2" >
+ <field name="on_change"/>
+ </group>
<separator string="Requirements" colspan="4"/>
<field name="requirements" nolabel="1" colspan="4"/>
<field name="section_ids" invisible="1" />
diff --git a/addons/crm/wizard/crm_lead_to_opportunity.py b/addons/crm/wizard/crm_lead_to_opportunity.py
index b8cdb9feb79..05d0d9e7dbd 100644
--- a/addons/crm/wizard/crm_lead_to_opportunity.py
+++ b/addons/crm/wizard/crm_lead_to_opportunity.py
@@ -70,8 +70,10 @@ class crm_lead2opportunity(osv.osv_memory):
cr, uid, opportunity_view_tree, context=context).res_id
lead = leads.browse(cr, uid, record_id, context=context)
- stage_ids = self.pool.get('crm.case.stage').search(cr, uid, [('type','=','opportunity'),('sequence','>=',1)])
-
+ if(lead.section_id):
+ stage_ids = self.pool.get('crm.case.stage').search(cr, uid, [('type','=','opportunity'),('sequence','>=',1), ('section_ids','=', lead.section_id.id)])
+ else:
+ stage_ids = self.pool.get('crm.case.stage').search(cr, uid, [('type','=','opportunity'),('sequence','>=',1)])
for this in self.browse(cr, uid, ids, context=context):
vals ={
'planned_revenue': this.planned_revenue,
diff --git a/addons/hr_attendance/hr_attendance.py b/addons/hr_attendance/hr_attendance.py
index 07ef528a7c9..7699e7468d9 100644
--- a/addons/hr_attendance/hr_attendance.py
+++ b/addons/hr_attendance/hr_attendance.py
@@ -75,7 +75,7 @@ class hr_attendance(osv.osv):
LIMIT 2 '''
cr.execute(sql,(id,id))
atts = cr.fetchall()
- if not ((len(atts)==1 and atts[0][0] == 'sign_in') or (atts[0][0] != atts[1][0] and atts[0][1] != atts[1][1])):
+ if not ((len(atts)==1 and atts[0][0] == 'sign_in') or (len(atts)==2 and atts[0][0] != atts[1][0] and atts[0][1] != atts[1][1])):
return False
return True
diff --git a/addons/product/product.py b/addons/product/product.py
index ff18fad0a30..801e647e3f2 100644
--- a/addons/product/product.py
+++ b/addons/product/product.py
@@ -567,7 +567,7 @@ class product_product(osv.osv):
ptrn=re.compile('(\[(.*?)\])')
res = ptrn.search(name)
if res:
- ids = self.search(cr, user, [('default_code','ilike',res.group(2))]+ args, limit=limit, context=context)
+ ids = self.search(cr, user, [('default_code','=', res.group(2))] + args, limit=limit, context=context)
else:
ids = self.search(cr, user, args, limit=limit, context=context)
result = self.name_get(cr, user, ids, context=context)
diff --git a/addons/project_planning/project_planning_demo.xml b/addons/project_planning/project_planning_demo.xml
index 34ecb58ab02..5ef27c628d9 100644
--- a/addons/project_planning/project_planning_demo.xml
+++ b/addons/project_planning/project_planning_demo.xml
@@ -8,7 +8,7 @@
<field name="name">Project_Planning</field>
<field name="business_days">20</field>
<field name="date_from" eval="time.strftime('%Y-%m-01 10:00:00')"/>
- <field name="date_to" eval="time.strftime('%Y-%m-30 15:23:00')"/>
+ <field name="date_to" eval="time.strftime('%Y-%m-28 15:00:00')"/>
<field name="state">open</field>
<field name="user_id" ref="project.res_users_project_manager"/>
</record>
diff --git a/addons/thunderbird/plugin/openerp_plugin.xpi b/addons/thunderbird/plugin/openerp_plugin.xpi
index 28e86390742..6ac7d0f435f 100644
--- a/addons/thunderbird/plugin/openerp_plugin.xpi
+++ b/addons/thunderbird/plugin/openerp_plugin.xpi
Binary files differ
diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar
index a392be18e67..753256e0247 100644
--- a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar
+++ b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar
Binary files differ
diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/config.js b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/config.js
index e06504baa09..064f8453d28 100644
--- a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/config.js
+++ b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/config.js
@@ -2,126 +2,134 @@
function config_close()
{
window.close("chrome://openerp_plugin/content/config_change.xul", "", "chrome");
- window.open("chrome://openerp_plugin/content/config.xul", "", "chrome");
+ window.open("chrome://openerp_plugin/content/config.xul", "", "chrome");
}
//set the value of the configuration fields
function config_change_load()
{
- var s = getServer();
- var a =s.split(':');
- if (String(a)=="" || String(a)=="undefined"){
- document.getElementById('txtcurl').value = "localhost"
- document.getElementById('txtcport').value = "8069"
- }
- else
- {
- len = a[1];
- var url = "";
- for (i=0;i<len.length;i++)
- { if (len[i] == "/")
- {
- continue
- }
- url += len[i]
- }
- if (String(url) == "" || String(url) == "undefined"){
- document.getElementById('txtcurl').value = "localhost"
- }
- else
- {
- document.getElementById('txtcurl').value = url
- }
-
- if (String(a[2]) == "" || String(a[2]) == "undefined"){
- document.getElementById('txtcport').value = "8069"
- setPort("8069");
- }
- else
- {
- document.getElementById('txtcport').value = a[2]
- setPort(a[2]);
- }
-
- }
+ var s = getServer();
+ var a =s.split(':');
+ if (String(a)=="" || String(a)=="undefined"){
+ document.getElementById('txtcurl').value = "localhost"
+ document.getElementById('txtcport').value = "8069"
+ }
+ else
+ {
+ len = a[1];
+ var url = "";
+ for (i=0;i<len.length;i++)
+ { if (len[i] == "/")
+ {
+ continue
+ }
+ url += len[i]
+ }
+ if (String(url) == "" || String(url) == "undefined"){
+ document.getElementById('txtcurl').value = "localhost"
+ }
+ else
+ {
+ document.getElementById('txtcurl').value = url
+ }
+
+ if (String(a[2]) == "" || String(a[2]) == "undefined"){
+ document.getElementById('txtcport').value = "8069"
+ setPort("8069");
+ }
+ else
+ {
+ document.getElementById('txtcport').value = a[2]
+ setPort(a[2]);
+ }
+
+ }
}
function config_change_load_web()
{
- //var s = getServer();
+ //var s = getServer();
weburl = getWebServerURL();
webport = getwebPort();
var urlport = weburl+':'+webport;
- var a =urlport.split(':');
- if (String(a)=="" || String(a)=="undefined"){
- document.getElementById('txtcweburl').value = "localhost"
- document.getElementById('txtcwebport').value = "8069"
- }
- else
- {
- len = a[1];
- var url = "";
- for (i=0;i<len.length;i++)
- { if (len[i] == "/")
- {
- continue
- }
- url += len[i]
- }
- if (String(url) == "" || String(url) == "undefined"){
- document.getElementById('txtcweburl').value = "localhost"
- }
- else
- {
- document.getElementById('txtcweburl').value = url
- }
-
- if (String(a[2]) == "" || String(a[2]) == "undefined"){
- document.getElementById('txtcwebport').value = "8069"
- setwebPort("8069");
- }
- else
- {
- document.getElementById('txtcwebport').value = a[2]
- setwebPort(a[2]);
- }
-
- }
+ var a =urlport.split(':');
+ if (String(a)=="" || String(a)=="undefined"){
+ document.getElementById('txtcweburl').value = "localhost"
+ document.getElementById('txtcwebport').value = "8069"
+ }
+ else
+ {
+ len = a[1];
+ var url = "";
+ for (i=0;i<len.length;i++)
+ { if (len[i] == "/")
+ {
+ continue
+ }
+ url += len[i]
+ }
+ if (String(url) == "" || String(url) == "undefined"){
+ document.getElementById('txtcweburl').value = "localhost"
+ }
+ else
+ {
+ document.getElementById('txtcweburl').value = url
+ }
+
+ if (String(a[2]) == "" || String(a[2]) == "undefined"){
+ document.getElementById('txtcwebport').value = "8069"
+ setwebPort("8069");
+ }
+ else
+ {
+ document.getElementById('txtcwebport').value = a[2]
+ setwebPort(a[2]);
+ }
+
+ }
}
function config_ok()
{
- if (document.getElementById('txtcurl').value == '')
- {
+ if (document.getElementById('txtcurl').value == '')
+ {
alert("You Must Enter Server Name!")
- return false;
+ return false;
- }
- if (document.getElementById('txtcport').value == '')
- {
- alert("You Must Enter Port!")
- return false;
- }
- setServer("http://"+document.getElementById('txtcurl').value +":" + document.getElementById('txtcport').value);
- window.close("chrome://openerp_plugin/content/config_change.xul", "", "chrome");
+ }
+ if (document.getElementById('txtcport').value == '')
+ {
+ alert("You Must Enter Port!")
+ return false;
+ }
+ setServer("http://"+document.getElementById('txtcurl').value +":" + document.getElementById('txtcport').value);
+ window.close("chrome://openerp_plugin/content/config_change.xul", "", "chrome");
window.open("chrome://openerp_plugin/content/config.xul", "", "chrome");
}
function config_ok_web()
{
- if (document.getElementById('txtcweburl').value == '')
- {
+ if (document.getElementById('txtcweburl').value == '')
+ {
alert("You Must Enter Server Name!")
- return false;
+ return false;
- }
- if (document.getElementById('txtcwebport').value == '')
- {
- alert("You Must Enter Port!")
- return false;
- }
- setWebServerURL("http://"+document.getElementById('txtcweburl').value +":" + document.getElementById('txtcwebport').value);
- window.close("chrome://openerp_plugin/content/config_change_web.xul", "", "chrome");
+ }
+ if (document.getElementById('txtcwebport').value == '' && !document.getElementById('lblssl').checked)
+ {
+ alert("You Must Enter Port!")
+ return false;
+ }
+ var protocol = "http://";
+ var port = document.getElementById('txtcwebport').value
+ if(document.getElementById('lblssl').checked) {
+ protocol = "https://";
+ if(port == '') {
+ port = 443
+ }
+ }
+ setWebServerURL(protocol + document.getElementById('txtcweburl').value +":" + port);
+ window.close("chrome://openerp_plugin/content/config_change_web.xul", "", "chrome");
window.open("chrome://openerp_plugin/content/config.xul", "", "chrome");
}
@@ -139,89 +147,89 @@ function openConfigChangeweb()
function appendDbList()
{
- setServerService('xmlrpc/db');
- getDbList('DBlist');
+ setServerService('xmlrpc/db');
+ getDbList('DBlist');
}
//set the database list in the listbox in configuration window
function setDb()
{
- var cmbDbList = document.getElementById('listDBListBox');
- document.getElementById('DBlist').value = cmbDbList.getItemAtIndex(cmbDbList.selectedIndex).value;
+ var cmbDbList = document.getElementById('listDBListBox');
+ document.getElementById('DBlist').value = cmbDbList.getItemAtIndex(cmbDbList.selectedIndex).value;
}
//stores the value of configuration fields in preferences
function okClick()
{
- if (getDBList()=="false")
- {
- if (document.getElementById('DBlist_text').value =='')
- {
- alert("You Must Enter Database Name");
- return false;
- }
- setDbName(document.getElementById('DBlist_text').value);
- }
- else if(document.getElementById('DBlist') != null)
- {
- setDbName(document.getElementById('DBlist').value);
- }
- setServer(document.getElementById('txturl').value);
- var s = document.getElementById('txturl').value;
- var a =s.split(':');
- setPort(a[a.length-1]);
- setUsername(document.getElementById('txtusername').value);
- setPassword(document.getElementById('txtpassword').value);
- window.close();
+ if (getDBList()=="false")
+ {
+ if (document.getElementById('DBlist_text').value =='')
+ {
+ alert("You Must Enter Database Name");
+ return false;
+ }
+ setDbName(document.getElementById('DBlist_text').value);
+ }
+ else if(document.getElementById('DBlist') != null)
+ {
+ setDbName(document.getElementById('DBlist').value);
+ }
+ setServer(document.getElementById('txturl').value);
+ var s = document.getElementById('txturl').value;
+ var a =s.split(':');
+ setPort(a[a.length-1]);
+ setUsername(document.getElementById('txtusername').value);
+ setPassword(document.getElementById('txtpassword').value);
+ window.close();
}
//deletes the value of the selected value in the listbox in configuraton menu
function deleteDocument(){
- if(document.getElementById("listObjectListBox").selectedItem){
- var objectlist = getPref().getCharPref("object").split(',');
- var imagelist = getPref().getCharPref("imagename").split(',');
- var objlist = getPref().getCharPref("listobject").split(',');
- if(objectlist.length>0){
- var objectcharpref = '';
- var imagecharpref = '';
- var objcharpref = '';
- var nodelist = document.getElementById("listObjectListBox").selectedItem.childNodes
- var childnode = document.getElementById("listObjectListBox").childNodes
- for(i=2;i<childnode.length;i++){
- if(childnode[i].hasChildNodes){
- var secondchild = childnode[i].childNodes;
- if (secondchild[1].getAttribute("label") != nodelist[1].getAttribute("label")){
- objcharpref += secondchild[0].getAttribute("label")+',';
- objectcharpref += secondchild[1].getAttribute("label")+',';
- imagecharpref += secondchild[2].getAttribute("image")+',';
- }
- }
- }
- var demo3 = objectcharpref.substring(0,objectcharpref.length-1);
- var demo4 = imagecharpref.substring(0,imagecharpref.length-1);
- var demo5 = objcharpref.substring(0,objcharpref.length-1);
-
- getPref().setCharPref("listobject",demo5);
- getPref().setCharPref("object",demo3);
- getPref().setCharPref("imagename",demo4);
- }
- document.getElementById("listObjectListBox").removeItemAt(document.getElementById("listObjectListBox").selectedIndex)
- }
- else{
- alert("Please Select Any One Document ");
- }
+ if(document.getElementById("listObjectListBox").selectedItem){
+ var objectlist = getPref().getCharPref("object").split(',');
+ var imagelist = getPref().getCharPref("imagename").split(',');
+ var objlist = getPref().getCharPref("listobject").split(',');
+ if(objectlist.length>0){
+ var objectcharpref = '';
+ var imagecharpref = '';
+ var objcharpref = '';
+ var nodelist = document.getElementById("listObjectListBox").selectedItem.childNodes
+ var childnode = document.getElementById("listObjectListBox").childNodes
+ for(i=2;i<childnode.length;i++){
+ if(childnode[i].hasChildNodes){
+ var secondchild = childnode[i].childNodes;
+ if (secondchild[1].getAttribute("label") != nodelist[1].getAttribute("label")){
+ objcharpref += secondchild[0].getAttribute("label")+',';
+ objectcharpref += secondchild[1].getAttribute("label")+',';
+ imagecharpref += secondchild[2].getAttribute("image")+',';
+ }
+ }
+ }
+ var demo3 = objectcharpref.substring(0,objectcharpref.length-1);
+ var demo4 = imagecharpref.substring(0,imagecharpref.length-1);
+ var demo5 = objcharpref.substring(0,objcharpref.length-1);
+
+ getPref().setCharPref("listobject",demo5);
+ getPref().setCharPref("object",demo3);
+ getPref().setCharPref("imagename",demo4);
+ }
+ document.getElementById("listObjectListBox").removeItemAt(document.getElementById("listObjectListBox").selectedIndex)
+ }
+ else{
+ alert("Please Select Any One Document ");
+ }
}
//function to add the image file for the checkbox
function addFile(){
- var nsIFilePicker = Components.interfaces.nsIFilePicker;
- var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);
- fp.init(this, "Select a File", nsIFilePicker.modeOpen);
- fp.appendFilters(nsIFilePicker.filterImages);
- var res = fp.show();
- if (res == nsIFilePicker.returnOK){
- var thefile = fp.file;
- document.getElementById("txtimagename").value = thefile.path
- }
+ var nsIFilePicker = Components.interfaces.nsIFilePicker;
+ var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);
+ fp.init(this, "Select a File", nsIFilePicker.modeOpen);
+ fp.appendFilters(nsIFilePicker.filterImages);
+ var res = fp.show();
+ if (res == nsIFilePicker.returnOK){
+ var thefile = fp.file;
+ document.getElementById("txtimagename").value = thefile.path
+ }
}
diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/config_change_web.xul b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/config_change_web.xul
index 9a46642d18b..fa23a9a0c40 100644
--- a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/config_change_web.xul
+++ b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/config_change_web.xul
@@ -2,25 +2,29 @@
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://openerp_plugin/locale/config_change.dtd">
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- xmlns:html="http://www.w3.org/1999/xhtml" onload="config_change_load_web()"
- title="Openerp Connection" height="140" width="240">
+ xmlns:html="http://www.w3.org/1999/xhtml" onload="config_change_load_web()"
+ title="Openerp Connection" height="140" width="240">
<script type="text/javascript" src="chrome://openerp_plugin/content/tiny_xmlrpc.js"></script>
<script type="text/javascript" src="chrome://openerp_plugin/content/config.js"></script>
<script type="text/javascript" src="chrome://openerp_plugin/content/loaddata.js"></script>
<script type="text/javascript" src="chrome://openerp_plugin/content/static.js"></script>
<script type="text/javascript" src="chrome://openerp_plugin/content/overlay.js"></script>
- <hbox>
- <label align="center" id="heading" value="&lblheading.label;" style="padding-left:38px" />
+ <hbox>
+ <label align="center" id="heading" value="&lblheading.label;" style="padding-left:38px" />
</hbox>
<groupbox id="gpData" width="200">
- <hbox >
- <label id="lblurl" control="txtcurl" value="&lblurl.label;" width="50"/>
- <textbox id="txtcweburl" width="140" />
- </hbox>
- <hbox>
- <label id="lblport" control="txtcport" value="&lblport.label;" width="50"/>
- <textbox id="txtcwebport" width="140" />
- </hbox>
+ <hbox >
+ <label id="lblurl" control="txtcurl" value="&lblurl.label;" width="50"/>
+ <textbox id="txtcweburl" width="140" />
+ </hbox>
+ <hbox>
+ <label id="lblport" control="txtcport" value="&lblport.label;" width="50"/>
+ <textbox id="txtcwebport" width="140" />
+ </hbox>
+ <hbox>
+
+ <checkbox id="lblssl" label="SSL (https)" checked="false"/>
+ </hbox>
</groupbox>
<hbox align="right">
diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js
index 84aa9394ee4..963c379c453 100644
--- a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js
+++ b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js
@@ -612,7 +612,6 @@ function createMenuItem_db(aLabel) {
//xmlrpc request handler for getting the list of database
var listDbHandler = {
onResult: function(client, context, result) {
- setconnect_server("true")
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
var arrMethodList = result.QueryInterface(Components.interfaces.nsISupportsArray);
// Set the number of results
@@ -625,7 +624,7 @@ var listDbHandler = {
var database = ""
if (count > 0)
{
- setDBList("true")
+ setDBList("true");
var label = document.getElementById("database_option");
var vbox = document.createElement("vbox");
var hbox = document.createElement("hbox");
@@ -658,7 +657,7 @@ var listDbHandler = {
}
else
{
- setDBList("false")
+ setDBList("false");
}
// Loop through the results, adding items to the list
if (count)
@@ -682,22 +681,18 @@ var listDbHandler = {
onFault: function (client, ctxt, fault) {
-
+ setDBList("false");
},
onError: function (client, ctxt, status, errorMsg) {
- if(status == 0) {
- setconnect_server("true");
- setDBList("false");
- }
-
+ setDBList("false");
}
};
//function to get the database list
function getDbList(argControl)
{
- setDBList("false")
- setconnect_server("false")
+ setDBList("false");
+ setconnect_server("true");
// Enable correct security
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
// Get the instance of the XML-RPC client
@@ -1844,7 +1839,6 @@ function testConnection(){
function testConnection_web(){
var branchobj = getPref();
weburl = getWebServerURL();
-// window.open(weburl, "", "chrome","resizable=yes,scrollbars=yes,status=yes");
var messenger = Components.classes["@mozilla.org/messenger;1"].createInstance();
messenger = messenger.QueryInterface(Components.interfaces.nsIMessenger);
messenger.launchExternalURL(weburl);
@@ -1876,6 +1870,7 @@ var listcreateLoginHandler = {
//function to check the login information
function createConnection(){
+ setconnect_server("true");
var branchobj = getPref();
setServerService('xmlrpc/common');
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/locale/en-US/config_change_web.dtd b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/locale/en-US/config_change_web.dtd
index 5ec72d0b250..f241c1893cc 100644
--- a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/locale/en-US/config_change_web.dtd
+++ b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/locale/en-US/config_change_web.dtd
@@ -1,5 +1,7 @@
<!ENTITY lblurl.label "Server: ">
-<!ENTITY lblport.label "Port: ">
+<!ENTITY lblport.label "Port: ">
+<!ENTITY lblssl.label "Use SLL ? ">
+
<!ENTITY lblheading.label "Openerp Connection">
<!ENTITY imagecancel.value "chrome://openerp_plugin/skin/Error.gif">
<!ENTITY imageok.value "chrome://openerp_plugin/skin/Success.gif">