Nimesh Contractor(Open ERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-outlook.net-jam-nodb_list-nco into 
lp:~openerp-dev/openobject-addons/trunk-outlook.net-jam.

Requested reviews:
  Jigar Amin  (OpenERP) (jam-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-outlook.net-jam-nodb_list-nco/+merge/74561

hello sir,

    If Server us Running with option --no-databse-list, 
    Instead of List box it should show text to input db name in Mian 
Cinfiguration Window.

Thank you.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-outlook.net-jam-nodb_list-nco/+merge/74561
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-outlook.net-jam.
=== modified file 'outlook/plugin/openerp-outlook-plugin_v2.0/OpenERPOutlookPlugin/frm_openerp_configuration.Designer.cs'
--- outlook/plugin/openerp-outlook-plugin_v2.0/OpenERPOutlookPlugin/frm_openerp_configuration.Designer.cs	2011-09-07 09:54:00 +0000
+++ outlook/plugin/openerp-outlook-plugin_v2.0/OpenERPOutlookPlugin/frm_openerp_configuration.Designer.cs	2011-09-08 09:17:03 +0000
@@ -72,6 +72,7 @@
             this.imageListSmall = new System.Windows.Forms.ImageList(this.components);
             this.btn_main_close = new System.Windows.Forms.Button();
             this.opendialog_image = new System.Windows.Forms.OpenFileDialog();
+            this.txt_dbname = new System.Windows.Forms.TextBox();
             this.tb1.SuspendLayout();
             this.tbconfigsetting.SuspendLayout();
             this.pnwebparam.SuspendLayout();
@@ -124,9 +125,9 @@
             this.grpwebparam.Controls.Add(this.btn_webserver_parameter_change);
             this.grpwebparam.Controls.Add(this.txt_webserver_parameter);
             this.grpwebparam.Controls.Add(this.label2);
-            this.grpwebparam.Location = new System.Drawing.Point(3, 10);
+            this.grpwebparam.Location = new System.Drawing.Point(3, 7);
             this.grpwebparam.Name = "grpwebparam";
-            this.grpwebparam.Size = new System.Drawing.Size(370, 350);
+            this.grpwebparam.Size = new System.Drawing.Size(370, 353);
             this.grpwebparam.TabIndex = 52;
             this.grpwebparam.TabStop = false;
             this.grpwebparam.Text = "WebServer Parameters";
@@ -136,18 +137,20 @@
             this.btn_webserver_parameter_open.Location = new System.Drawing.Point(277, 82);
             this.btn_webserver_parameter_open.Name = "btn_webserver_parameter_open";
             this.btn_webserver_parameter_open.Size = new System.Drawing.Size(75, 23);
-            this.btn_webserver_parameter_open.TabIndex = 43;
+            this.btn_webserver_parameter_open.TabIndex = 7;
             this.btn_webserver_parameter_open.Text = "Open";
             this.btn_webserver_parameter_open.UseVisualStyleBackColor = true;
+            this.btn_webserver_parameter_open.Click += new System.EventHandler(this.btn_webserver_parameter_open_Click);
             // 
             // btn_webserver_parameter_change
             // 
             this.btn_webserver_parameter_change.Location = new System.Drawing.Point(196, 82);
             this.btn_webserver_parameter_change.Name = "btn_webserver_parameter_change";
             this.btn_webserver_parameter_change.Size = new System.Drawing.Size(75, 23);
-            this.btn_webserver_parameter_change.TabIndex = 42;
+            this.btn_webserver_parameter_change.TabIndex = 6;
             this.btn_webserver_parameter_change.Text = "Change";
             this.btn_webserver_parameter_change.UseVisualStyleBackColor = false;
+            this.btn_webserver_parameter_change.Click += new System.EventHandler(this.btn_webserver_parameter_change_Click);
             // 
             // txt_webserver_parameter
             // 
@@ -156,6 +159,7 @@
             this.txt_webserver_parameter.ReadOnly = true;
             this.txt_webserver_parameter.Size = new System.Drawing.Size(260, 20);
             this.txt_webserver_parameter.TabIndex = 41;
+            this.txt_webserver_parameter.TabStop = false;
             this.txt_webserver_parameter.Text = "http://localhost:8002";;
             // 
             // label2
@@ -177,6 +181,7 @@
             // 
             // grpconfig
             // 
+            this.grpconfig.Controls.Add(this.txt_dbname);
             this.grpconfig.Controls.Add(this.combo_config_database);
             this.grpconfig.Controls.Add(this.btn_openerp_connect);
             this.grpconfig.Controls.Add(this.txt_password);
@@ -200,15 +205,14 @@
             this.combo_config_database.Location = new System.Drawing.Point(88, 74);
             this.combo_config_database.Name = "combo_config_database";
             this.combo_config_database.Size = new System.Drawing.Size(269, 21);
-            this.combo_config_database.TabIndex = 61;
-            this.combo_config_database.SelectedIndexChanged += new System.EventHandler(this.combo_config_database_SelectedIndexChanged);
+            this.combo_config_database.TabIndex = 2;
             // 
             // btn_openerp_connect
             // 
             this.btn_openerp_connect.Location = new System.Drawing.Point(257, 156);
             this.btn_openerp_connect.Name = "btn_openerp_connect";
             this.btn_openerp_connect.Size = new System.Drawing.Size(100, 23);
-            this.btn_openerp_connect.TabIndex = 60;
+            this.btn_openerp_connect.TabIndex = 5;
             this.btn_openerp_connect.Text = "Connect";
             this.btn_openerp_connect.UseVisualStyleBackColor = true;
             this.btn_openerp_connect.Click += new System.EventHandler(this.btn_openerp_connect_Click);
@@ -219,21 +223,21 @@
             this.txt_password.Name = "txt_password";
             this.txt_password.PasswordChar = '*';
             this.txt_password.Size = new System.Drawing.Size(269, 20);
-            this.txt_password.TabIndex = 58;
+            this.txt_password.TabIndex = 4;
             // 
             // txt_username
             // 
             this.txt_username.Location = new System.Drawing.Point(88, 101);
             this.txt_username.Name = "txt_username";
             this.txt_username.Size = new System.Drawing.Size(269, 20);
-            this.txt_username.TabIndex = 57;
+            this.txt_username.TabIndex = 3;
             // 
             // btn_open_server_url_form
             // 
             this.btn_open_server_url_form.Location = new System.Drawing.Point(282, 45);
             this.btn_open_server_url_form.Name = "btn_open_server_url_form";
             this.btn_open_server_url_form.Size = new System.Drawing.Size(75, 23);
-            this.btn_open_server_url_form.TabIndex = 56;
+            this.btn_open_server_url_form.TabIndex = 1;
             this.btn_open_server_url_form.Text = "Change";
             this.btn_open_server_url_form.UseVisualStyleBackColor = true;
             this.btn_open_server_url_form.Click += new System.EventHandler(this.btn_open_server_url_form_Click);
@@ -244,7 +248,8 @@
             this.txt_server_config.Name = "txt_server_config";
             this.txt_server_config.ReadOnly = true;
             this.txt_server_config.Size = new System.Drawing.Size(186, 20);
-            this.txt_server_config.TabIndex = 55;
+            this.txt_server_config.TabIndex = 0;
+            this.txt_server_config.TabStop = false;
             this.txt_server_config.Text = "http://localhost:8069";;
             // 
             // lbn_password
@@ -489,7 +494,7 @@
             this.btn_main_close.Location = new System.Drawing.Point(789, 420);
             this.btn_main_close.Name = "btn_main_close";
             this.btn_main_close.Size = new System.Drawing.Size(75, 23);
-            this.btn_main_close.TabIndex = 41;
+            this.btn_main_close.TabIndex = 8;
             this.btn_main_close.Text = "Close";
             this.btn_main_close.UseVisualStyleBackColor = true;
             this.btn_main_close.Click += new System.EventHandler(this.btn_main_close_Click);
@@ -498,6 +503,14 @@
             // 
             this.opendialog_image.FileName = "openimagedialog";
             // 
+            // txt_dbname
+            // 
+            this.txt_dbname.Location = new System.Drawing.Point(88, 74);
+            this.txt_dbname.Name = "txt_dbname";
+            this.txt_dbname.Size = new System.Drawing.Size(269, 20);
+            this.txt_dbname.TabIndex = 2;
+            this.txt_dbname.Visible = false;
+            // 
             // frm_openerp_configuration
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -572,6 +585,7 @@
         private System.Windows.Forms.Label lbldocname;
         private System.Windows.Forms.Label lbltitle;
         private System.Windows.Forms.TextBox txtobj_title;
+        private System.Windows.Forms.TextBox txt_dbname;
 
     }
 }
\ No newline at end of file

=== modified file 'outlook/plugin/openerp-outlook-plugin_v2.0/OpenERPOutlookPlugin/frm_openerp_configuration.cs'
--- outlook/plugin/openerp-outlook-plugin_v2.0/OpenERPOutlookPlugin/frm_openerp_configuration.cs	2011-09-07 10:12:38 +0000
+++ outlook/plugin/openerp-outlook-plugin_v2.0/OpenERPOutlookPlugin/frm_openerp_configuration.cs	2011-09-08 09:17:03 +0000
@@ -55,14 +55,24 @@
         public ListView getname()
         {     
             string url = txt_server_config.Text;
-            XMLRPCConnect rpcclient_dblist = new XMLRPCConnect(url + "/xmlrpc/db");
-            Object[] res_dblist = rpcclient_dblist.list();
+            try
+            {
+                XMLRPCConnect rpcclient_dblist = new XMLRPCConnect(url + "/xmlrpc/db");
+                Object[] res_dblist = rpcclient_dblist.list();
+                foreach (var selection in res_dblist)
+                {
+                    combo_config_database.Items.Add(selection);
+                }
+            }
+            catch
+            {
+                txt_dbname.Visible = true;
+                combo_config_database.Visible = false;
+
+            }
             //ImageList imageSmallList = new ImageList();
 
-            foreach (var selection in res_dblist)
-            {
-                combo_config_database.Items.Add(selection);
-            }
+          
             lstviewdoc.SmallImageList = imageListSmall;
             item = new ListViewItem("Partners");
             item.Name = "res.partner";
@@ -108,7 +118,16 @@
         {
 
             url = txt_server_config.Text;
-            OpenERPConnect openerp_connect = new OpenERPConnect(url, combo_config_database.Text, txt_username.Text, txt_password.Text, txt_webserver_parameter.Text);
+            string dbname;
+            if (txt_dbname.Visible == true)
+            {
+                dbname = txt_dbname.Text;
+            }
+            else
+            {
+                dbname = combo_config_database.Text;
+            }
+            OpenERPConnect openerp_connect = new OpenERPConnect(url, dbname, txt_username.Text, txt_password.Text, txt_webserver_parameter.Text);
             Cache.openerpconnect = openerp_connect;
             if (openerp_connect.Login() != 0)
             {

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to