← Back to team overview

openerp-dev-web team mailing list archive

lp:~openerp-dev/openobject-addons/trunk-import_sugarcrm-sprint_25_backlog_correction-atp into lp:~openerp-dev/openobject-addons/trunk-import_sugarcrm

 

Atul Patel(OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-import_sugarcrm-sprint_25_backlog_correction-atp into lp:~openerp-dev/openobject-addons/trunk-import_sugarcrm.

Requested reviews:
  Bhumika (OpenERP) (sbh-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-import_sugarcrm-sprint_25_backlog_correction-atp/+merge/52040

Hello,

I have add exception when login failed.


Thanks

-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-import_sugarcrm-sprint_25_backlog_correction-atp/+merge/52040
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-import_sugarcrm.
=== modified file 'sugarcrm_syncro/__openerp__.py'
--- sugarcrm_syncro/__openerp__.py	2011-02-17 11:07:49 +0000
+++ sugarcrm_syncro/__openerp__.py	2011-03-03 11:05:26 +0000
@@ -26,7 +26,7 @@
     'description': """This Module Import SugarCRM "Leads", "Opportunity", "Accounts" and "contacts" Data into OpenERP Module.""",
     'author': 'OpenERP SA',
     'website': 'http://www.openerp.com',
-    'depends': [],
+    'depends': ['crm'],
     'init_xml': [],
     'update_xml': ["wizard/sugarcrm_login_view.xml",
                    "wizard/import_message_view.xml",

=== modified file 'sugarcrm_syncro/import_sugarcrm.py'
--- sugarcrm_syncro/import_sugarcrm.py	2011-02-17 11:07:49 +0000
+++ sugarcrm_syncro/import_sugarcrm.py	2011-03-03 11:05:26 +0000
@@ -29,15 +29,15 @@
      _name = "import.sugarcrm"
      _description = __doc__
      _columns = {
-        'mod_name':fields.selection([
-            ('lead','Leads'),
-            ('opportunity','Opportunities'),
-            ('accounts','Accounts'),
-            ('contact','Contacts'),
-        ],'Module Name', help="Module Name is used to specify which Module data want to Import"),
+        'lead': fields.boolean('Leads', help="If Leads is checked, SugarCRM Leads data imported in openerp crm-Lead form"),
+        'opportunity': fields.boolean('Opportunities', help="If Leads is checked, SugarCRM Leads data imported in openerp crm-Opportunity form"),
          'username': fields.char('User Name', size=64),
          'password': fields.char('Password', size=24),
      }
+     _defaults = {
+        'lead': lambda *a: True,
+        'opportunity': lambda *a: True,
+     }        
 
      def _get_all(self, cr, uid, model, sugar_val, context=None):
            models = self.pool.get(model)
@@ -57,28 +57,49 @@
         return self._get_all(
             cr, uid, 'res.country', sugar_val, context=context)
 
-     def _create_lead(self, cr, uid, sugar_val, country, state, context=None):
+     def _get_lead_status(self, cr, uid, sugar_val, context=None):
+        sugar_stage = ''
+        if sugar_val.get('status','') == 'New':
+            sugar_stage = 'New'
+        elif sugar_val.get('status','') == 'Assigned':
+            sugar_stage = 'Qualification'
+        elif sugar_val.get('status','') == 'In Progress':
+            sugar_stage = 'Proposition'
+        elif sugar_val.get('status','') == 'Recycled':
+            sugar_stage = 'Negotiation'
+        elif sugar_val.get('status','') == 'Dead':
+            sugar_stage = 'Lost'
+        else:
+            sugar_stage = ''
+        return sugar_stage
+
+     def _get_opportunity_status(self, cr, uid, sugar_val, context=None):
+         
+        sugar_stage = ''
+        if sugar_val.get('sales_stage','') == 'Need Analysis':
+             sugar_stage = 'New'
+        elif sugar_val.get('sales_stage','') == 'Closed Lost':
+             sugar_stage = 'Lost'
+        elif sugar_val.get('sales_stage','') == 'Closed Won':
+             sugar_stage = 'Won'
+        elif sugar_val.get('sales_stage','') == 'Value Proposition':
+             sugar_stage = 'Proposition'
+        elif sugar_val.get('sales_stage','') == 'Negotiation/Review':
+             sugar_stage = 'Negotiation'
+        else:
+             sugar_stage = ''
+        return sugar_stage    
+    
+     def create_lead(self, cr, uid, sugar_val, country, state, context=None):
            lead_pool = self.pool.get("crm.lead")
-           
            stage_id = ''
+           stage = self._get_lead_status(cr, uid, sugar_val, context=None)
            stage_pool = self.pool.get('crm.case.stage')
-           if sugar_val.get('status','') == 'New':
-               sugar_stage = 'New'
-           elif sugar_val.get('status','') == 'Assigned':
-               sugar_stage = 'Qualification'
-           elif sugar_val.get('status','') == 'In Progress':
-               sugar_stage = 'Proposition'
-           elif sugar_val.get('status','') == 'Recycled':
-               sugar_stage = 'Negotiation'
-           elif sugar_val.get('status','') == 'Dead':
-               sugar_stage = 'Lost'
-           else:
-               sugar_stage = ''
-           stage_ids = stage_pool.search(cr, uid, [("type", '=', 'lead'), ('name', '=', sugar_stage)])
+
+           stage_ids = stage_pool.search(cr, uid, [("type", '=', 'lead'), ('name', '=', stage)])
 
            for stage in stage_pool.browse(cr, uid, stage_ids):
                stage_id = stage.id     
-                     
            vals = {'name': sugar_val.get('first_name','')+' '+ sugar_val.get('last_name',''),
                    'contact_name': sugar_val.get('first_name','')+' '+ sugar_val.get('last_name',''),
                    'user_id':sugar_val.get('created_by',''),
@@ -99,24 +120,14 @@
            new_lead_id = lead_pool.create(cr, uid, vals)
            return new_lead_id
 
-     def _create_opportunity(self, cr, uid, sugar_val, country, state, context=None):
+     def create_opportunity(self, cr, uid, sugar_val, country, state, context=None):
 
            lead_pool = self.pool.get("crm.lead")
            stage_id = ''
            stage_pool = self.pool.get('crm.case.stage')
-           if sugar_val.get('sales_stage','') == 'Need Analysis':
-               sugar_stage = 'New'
-           elif sugar_val.get('sales_stage','') == 'Closed Lost':
-               sugar_stage = 'Lost'
-           elif sugar_val.get('sales_stage','') == 'Closed Won':
-               sugar_stage = 'Won'
-           elif sugar_val.get('sales_stage','') == 'Value Proposition':
-               sugar_stage = 'Proposition'
-           elif sugar_val.get('sales_stage','') == 'Negotiation/Review':
-               sugar_stage = 'Negotiation'
-           else:
-               sugar_stage = ''
-           stage_ids = stage_pool.search(cr, uid, [("type", '=', 'opportunity'), ('name', '=', sugar_stage)])           
+           stage = self._get_opportunity_status(cr, uid, sugar_val, context)
+           
+           stage_ids = stage_pool.search(cr, uid, [("type", '=', 'opportunity'), ('name', '=', stage)])           
            for stage in stage_pool.browse(cr, uid, stage_ids):
                stage_id = stage.id
            vals = {'name': sugar_val.get('name',''),
@@ -131,7 +142,7 @@
            new_opportunity_id = lead_pool.create(cr, uid, vals)
            return new_opportunity_id
 
-     def _create_contact(self, cr, uid, sugar_val, country, state, context=None):
+     def create_contact(self, cr, uid, sugar_val, country, state, context=None):
            addr_pool = self.pool.get("res.partner.address")
            partner_pool = self.pool.get("res.partner")
 
@@ -155,46 +166,73 @@
            addr_pool.create(cr, uid, addr_vals)
            return new_partner_id
 
-
+     def _get_sugar_module_name(self, cr, uid, ids, context=None):
+        
+        sugar_name = []
+
+        for current in self.read(cr, uid, ids):
+          if current.get('lead'):   
+              sugar_name.append('Leads')
+          if  current.get('opportunity'):
+              sugar_name.append('Opportunities')
+          if current.get('lead') and current.get('opportunity'):     
+              sugar_name.append('Leads')
+              sugar_name.append('Opportunities')
+                
+        return sugar_name    
+    
+
+     def _get_module_name(self, cr, uid, ids, context=None):
+        
+       module_name = []
+
+       for current in self.read(cr, uid, ids, ['lead', 'opportunity']):
+          if not current.get('lead') and not current.get('opportunity'):
+              raise osv.except_osv(_('Error !'), _('Please Select Module')) 
+               
+          if current.get('lead'):   
+              module_name.append('crm')
+          if current.get('opportunity'):    
+              module_name.append('crm')
+              
+
+          ids = self.pool.get("ir.module.module").search(cr, uid, [('name', 'in', module_name),('state', '=', 'installed')])
+          if not ids:
+              for module in module_name:
+                  raise osv.except_osv(_('Error !'), _('Please  Install %s Module') % ((module)))
+
+     def get_create_method(self, cr, uid, sugar_name, sugar_val, country, state, context):
+       
+        if sugar_name == "Leads":
+            self.create_lead(cr, uid, sugar_val, country, state, context)
+        
+        elif sugar_name == "Opportunities":
+            self.create_opportunity(cr, uid, sugar_val, country, state,context)
+
+        elif sugar_name == "Contacts":
+            self.create_contact(cr, uid, sugar_val, country, state, context)
+        return {}    
+    
      def import_data(self, cr, uid, ids,context=None):
        if not context:
         context={}
-       for current in self.browse(cr, uid, ids):
-        if current.mod_name == 'lead' or current.mod_name == 'opportunity':
-          module_name = 'crm'
-
-        elif current.mod_name == "accounts":
-          module_name = 'account'
-        else:
-          module_name = 'base'
-
-        ids = self.pool.get("ir.module.module").search(cr, uid, [("name", '=',
-           module_name), ('state', '=', 'installed')])
-        if not ids:
-           raise osv.except_osv(_('Error !'), _('Please  Install %s Module') % (module_name))
-
-        if current.mod_name == 'lead':
-           sugar_name = "Leads"
-        elif current.mod_name == 'opportunity':
-           sugar_name="Opportunities"
-        elif current.mod_name == 'accounts':
-           sugar_name="Accounts"
-        elif current.mod_name == 'contact':
-           sugar_name="Contacts"
+       sugar_val = []
+              
+       self._get_module_name(cr, uid, ids, context)
+       sugar_module = self._get_sugar_module_name(cr, uid, ids, context=None)
+                 
        PortType,sessionid = sugar.login(context.get('username',''), context.get('password',''))
-       sugar_data = sugar.search(PortType,sessionid,sugar_name)
-       if sugar_data:    
-           for sugar_val in sugar_data:
-                country = self._get_all_countries(cr, uid, sugar_val.get('primary_address_country'), context)
-                state = self._get_all_states(cr, uid, sugar_val.get('primary_address_state'), context)
-                if sugar_name == "Leads":
-                    self._create_lead(cr, uid, sugar_val, country, state, context)
-    
-                elif sugar_name == "Opportunities":
-                    self._create_opportunity(cr, uid, sugar_val, country, state,context)
-    
-                elif sugar_name == "Contacts":
-                    self._create_contact(cr, uid, sugar_val, country, state, context)
+       for sugar_name in sugar_module:
+           sugar_data = sugar.search(PortType,sessionid,sugar_name)
+           sugar_val.append(sugar_data)
+           
+       
+       for data in sugar_val:
+           for val in data: 
+                country = self._get_all_countries(cr, uid, val.get('primary_address_country'), context)
+                state = self._get_all_states(cr, uid, val.get('primary_address_state'), context)
+                self.get_create_method(cr, uid, sugar_name, val, country, state, context)
+
                     
        obj_model = self.pool.get('ir.model.data')
        model_data_ids = obj_model.search(cr,uid,[('model','=','ir.ui.view'),('name','=','import.message.form')])

=== modified file 'sugarcrm_syncro/import_sugarcrm_view.xml'
--- sugarcrm_syncro/import_sugarcrm_view.xml	2011-02-17 11:07:49 +0000
+++ sugarcrm_syncro/import_sugarcrm_view.xml	2011-03-03 11:05:26 +0000
@@ -11,7 +11,8 @@
                 <form string="Import Sugarcrm">
                     <group colspan="4" >
                          <separator string="Select SugarCRM Module Name" colspan="4"/>
-                         <field name="mod_name" />
+                         <field name="lead" />
+                         <field name="opportunity" />
                          <field name="username" invisible="1"/>
                          <field name="password" invisible="1"/>
                     </group>

=== modified file 'sugarcrm_syncro/sugar.py'
--- sugarcrm_syncro/sugar.py	2011-02-17 11:07:49 +0000
+++ sugarcrm_syncro/sugar.py	2011-03-03 11:05:26 +0000
@@ -1,42 +1,67 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    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/>.
+#
+##############################################################################
+
 
 import hashlib
 from sugarsoap_services import *
-from sugarsoap_services_types import *;
-
+from sugarsoap_services_types import *
+from osv import fields, osv
+from tools.translate import _
 import sys;
 
 class LoginError(Exception): pass
 
 def login(username, password):
-    loc = sugarsoapLocator();
-
-    portType = loc.getsugarsoapPortType();
-    request = loginRequest();
-    uauth = ns0.user_auth_Def(request);
-    request._user_auth = uauth;
-
-    uauth._user_name = username;
-    uauth._password = hashlib.md5(password).hexdigest();
-    uauth._version = '1.1';
-
-    response = portType.login(request);
+    loc = sugarsoapLocator()
+
+    portType = loc.getsugarsoapPortType()
+    request = loginRequest()
+    uauth = ns0.user_auth_Def(request)
+    request._user_auth = uauth
+
+    uauth._user_name = username
+    uauth._password = hashlib.md5(password).hexdigest()
+    uauth._version = '1.1'
+    try:
+        response = portType.login(request)
+    except:
+        raise osv.except_osv(_('Error !'), _('Authentication error !\nBad Username or Password !'))
     if -1 == response._return._id:
-        raise LoginError(response._return._error._description);
-    return (portType, response._return._id);
+        raise LoginError(response._return._error._description)
+    return (portType, response._return._id)
 
 def search(portType, sessionid, module_name=None):
-  se_req = get_entry_listRequest();
+  se_req = get_entry_listRequest()
   se_req._session = sessionid
   se_req._module_name = module_name
-  se_resp = portType.get_entry_list(se_req);
-  list = se_resp._return._entry_list;
+  se_resp = portType.get_entry_list(se_req)
   ans_list = []
-  for i in list:
-      ans_dir = {};
-      for j in i._name_value_list:
-          ans_dir[j._name.encode('utf-8')] = j._value.encode('utf-8')
-        #end for
-      ans_list.append(ans_dir);
+  if se_resp:
+      list = se_resp._return._entry_list
+      for i in list:
+          ans_dir = {}
+          for j in i._name_value_list:
+              ans_dir[j._name.encode('utf-8')] = j._value.encode('utf-8')
+            #end for
+          ans_list.append(ans_dir)
     #end for
-  return ans_list;
+  return ans_list
 

=== modified file 'sugarcrm_syncro/sugarsoap_services.py'
--- sugarcrm_syncro/sugarsoap_services.py	2011-02-23 12:49:22 +0000
+++ sugarcrm_syncro/sugarsoap_services.py	2011-03-03 11:05:26 +0000
@@ -7,8 +7,9 @@
 from sugarsoap_services_types import *
 from osv import osv
 from tools.translate import _
-
-
+import socket
+ 
+IP = socket.gethostbyname(socket.gethostname())
 try:
     import ZSI
     from ZSI.TCcompound import Struct
@@ -21,7 +22,7 @@
 
 # Locator
 class sugarsoapLocator:
-    sugarsoapPortType_address = "http://localhost/sugarcrm/soap.php";
+    sugarsoapPortType_address = "http://"+ IP + "/sugarcrm/soap.php"
     def getsugarsoapPortTypeAddress(self):
         return sugarsoapLocator.sugarsoapPortType_address
     def getsugarsoapPortType(self, url=None, **kw):
@@ -42,7 +43,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/create_session";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP + "/sugarcrm/soap.php/create_session", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=create_sessionResponse.typecode.ofwhat, pyclass=create_sessionResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -54,7 +55,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/end_session";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"; + IP + "/sugarcrm/soap.php/end_session", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=end_sessionResponse.typecode.ofwhat, pyclass=end_sessionResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -66,7 +67,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/contact_by_email";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"; + IP + "/sugarcrm/soap.php/contact_by_email", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=contact_by_emailResponse.typecode.ofwhat, pyclass=contact_by_emailResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -78,7 +79,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/user_list";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"; + IP + "/sugarcrm/soap.php/user_list", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=user_listResponse.typecode.ofwhat, pyclass=user_listResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -90,7 +91,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/search";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/search", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=searchResponse.typecode.ofwhat, pyclass=searchResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -102,7 +103,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/track_email";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/track_email", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=track_emailResponse.typecode.ofwhat, pyclass=track_emailResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -114,7 +115,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/create_contact";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/create_contact", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=create_contactResponse.typecode.ofwhat, pyclass=create_contactResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -126,7 +127,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/create_lead";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/create_lead", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=create_leadResponse.typecode.ofwhat, pyclass=create_leadResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -138,7 +139,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/create_account";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/create_account", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=create_accountResponse.typecode.ofwhat, pyclass=create_accountResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -150,7 +151,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/create_opportunity";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/create_opportunity", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=create_opportunityResponse.typecode.ofwhat, pyclass=create_opportunityResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -162,7 +163,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/create_case";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/create_case", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=create_caseResponse.typecode.ofwhat, pyclass=create_caseResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -174,7 +175,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/login";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/login", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=loginResponse.typecode.ofwhat, pyclass=loginResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -186,7 +187,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/is_loopback";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/is_loopback", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=is_loopbackResponse.typecode.ofwhat, pyclass=is_loopbackResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -198,7 +199,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/seamless_login";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/seamless_login", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=seamless_loginResponse.typecode.ofwhat, pyclass=seamless_loginResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -210,7 +211,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/get_entry_list";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_entry_list", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=get_entry_listResponse.typecode.ofwhat, pyclass=get_entry_listResponse.typecode.pyclass)
         try:
@@ -225,7 +226,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/get_entry";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_entry", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=get_entryResponse.typecode.ofwhat, pyclass=get_entryResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -237,7 +238,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/get_entries";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_entries", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=get_entriesResponse.typecode.ofwhat, pyclass=get_entriesResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -249,7 +250,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/set_entry";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/set_entry", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=set_entryResponse.typecode.ofwhat, pyclass=set_entryResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -261,7 +262,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/set_entries";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/set_entries", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=set_entriesResponse.typecode.ofwhat, pyclass=set_entriesResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -273,7 +274,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/set_note_attachment";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/set_note_attachment", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=set_note_attachmentResponse.typecode.ofwhat, pyclass=set_note_attachmentResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -285,7 +286,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/get_note_attachment";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_note_attachment", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=get_note_attachmentResponse.typecode.ofwhat, pyclass=get_note_attachmentResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -297,7 +298,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/relate_note_to_module";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/relate_note_to_module", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=relate_note_to_moduleResponse.typecode.ofwhat, pyclass=relate_note_to_moduleResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -309,7 +310,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/get_related_notes";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_related_notes", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=get_related_notesResponse.typecode.ofwhat, pyclass=get_related_notesResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -321,7 +322,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/logout";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/logout", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=logoutResponse.typecode.ofwhat, pyclass=logoutResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -333,7 +334,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/get_module_fields";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_module_fields", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=get_module_fieldsResponse.typecode.ofwhat, pyclass=get_module_fieldsResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -345,7 +346,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/get_available_modules";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_available_modules", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=get_available_modulesResponse.typecode.ofwhat, pyclass=get_available_modulesResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -357,7 +358,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/update_portal_user";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/update_portal_user", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=update_portal_userResponse.typecode.ofwhat, pyclass=update_portal_userResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -369,7 +370,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/test";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/test", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=testResponse.typecode.ofwhat, pyclass=testResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -381,7 +382,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/get_user_id";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_user_id", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=get_user_idResponse.typecode.ofwhat, pyclass=get_user_idResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -393,7 +394,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/get_user_team_id";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_user_team_id", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=get_user_team_idResponse.typecode.ofwhat, pyclass=get_user_team_idResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -405,7 +406,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/get_server_time";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_server_time", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=get_server_timeResponse.typecode.ofwhat, pyclass=get_server_timeResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -417,7 +418,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/get_gmt_time";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_gmt_time", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=get_gmt_timeResponse.typecode.ofwhat, pyclass=get_gmt_timeResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -429,7 +430,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/get_sugar_flavor";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_sugar_flavor", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=get_sugar_flavorResponse.typecode.ofwhat, pyclass=get_sugar_flavorResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -441,7 +442,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/get_server_version";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_server_version", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=get_server_versionResponse.typecode.ofwhat, pyclass=get_server_versionResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -453,7 +454,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/get_relationships";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_relationships", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=get_relationshipsResponse.typecode.ofwhat, pyclass=get_relationshipsResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -465,7 +466,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/set_relationship";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/set_relationship", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=set_relationshipResponse.typecode.ofwhat, pyclass=set_relationshipResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -477,7 +478,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/set_relationships";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/set_relationships", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=set_relationshipsResponse.typecode.ofwhat, pyclass=set_relationshipsResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -489,7 +490,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/set_document_revision";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/set_document_revision", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=set_document_revisionResponse.typecode.ofwhat, pyclass=set_document_revisionResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -501,7 +502,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/search_by_module";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/search_by_module", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=search_by_moduleResponse.typecode.ofwhat, pyclass=search_by_moduleResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -513,7 +514,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/sync_get_modified_relationships";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/sync_get_modified_relationships", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=sync_get_modified_relationshipsResponse.typecode.ofwhat, pyclass=sync_get_modified_relationshipsResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -525,7 +526,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/get_modified_entries";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_modified_entries", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=get_modified_entriesResponse.typecode.ofwhat, pyclass=get_modified_entriesResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)
@@ -537,7 +538,7 @@
             raise TypeError, "%s incorrect request type" % (request.__class__)
         kw = {}
         # no input wsaction
-        self.binding.Send(None, None, request, soapaction="http://localhost/sugarcrm/soap.php/get_attendee_list";, encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
+        self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_attendee_list", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";, **kw)
         # no output wsaction
         typecode = Struct(pname=None, ofwhat=get_attendee_listResponse.typecode.ofwhat, pyclass=get_attendee_listResponse.typecode.pyclass)
         response = self.binding.Receive(typecode)

=== modified file 'sugarcrm_syncro/wizard/sugarcrm_login.py'
--- sugarcrm_syncro/wizard/sugarcrm_login.py	2011-02-17 11:48:10 +0000
+++ sugarcrm_syncro/wizard/sugarcrm_login.py	2011-03-03 11:05:26 +0000
@@ -37,7 +37,7 @@
         for current in self.browse(cr, uid, ids, context):
             PortType,sessionid = sugar.login(current.username, current.password)
             if sessionid == '-1':
-                raise osv.except_osv(_('Error !'), _('Wrong username and password'))
+                raise osv.except_osv(_('Error !'), _('Authentication error !\nBad Username or Password !'))
 
             obj_model = self.pool.get('ir.model.data')
             model_data_ids = obj_model.search(cr,uid,[('model','=','ir.ui.view'),('name','=','import.sugarcrm.form')])

=== modified file 'sugarcrm_syncro/wizard/sugarcrm_login_view.xml'
--- sugarcrm_syncro/wizard/sugarcrm_login_view.xml	2011-02-17 11:07:49 +0000
+++ sugarcrm_syncro/wizard/sugarcrm_login_view.xml	2011-03-03 11:05:26 +0000
@@ -19,7 +19,7 @@
                     <group colspan="4" >
                         <label string="" colspan="2"/>
                         <button  icon="gtk-cancel" special="cancel" string="_Cancel"/>
-                        <button name="open_import" string="Login"
+                        <button name="open_import" string="_Login"
                                 type="object" icon="gtk-ok"/>
                    </group>
                 </form>


Follow ups