diff --git a/addons/import_sugarcrm/import_sugarcrm.py b/addons/import_sugarcrm/import_sugarcrm.py index e78dbc7159f..5fe9a23fa8e 100644 --- a/addons/import_sugarcrm/import_sugarcrm.py +++ b/addons/import_sugarcrm/import_sugarcrm.py @@ -1,4 +1,4 @@ -e# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution @@ -27,8 +27,8 @@ from datetime import datetime import base64 import pprint pp = pprint.PrettyPrinter(indent=4) - #copy old import here + class related_ref(dbmapper): def __init__(self, type): self.type = type @@ -39,6 +39,7 @@ class related_ref(dbmapper): return '' class sugar_import(import_framework): + URL = False TABLE_CONTACT = 'Contacts' TABLE_ACCOUNT = 'Accounts' TABLE_USER = 'Users' @@ -62,7 +63,18 @@ class sugar_import(import_framework): def initialize(self): #login - PortType,sessionid = sugar.login(self.context.get('username',''), self.context.get('password',''), self.context.get('url','')) + global URL + url = self.context.get('url','') + url_sting = [] + for url in str(url).split('/'): + if url.startswith('index.php'): + url_soap = url.replace(url, 'soap.php') + url_sting.append(url_soap) + else: + url_sting.append(url) + URL = '/'.join(url_sting) + + PortType,sessionid = sugar.login(self.context.get('username',''), self.context.get('password',''), URL) if sessionid == '-1': raise osv.except_osv(_('Error !'), _('Authentication error !\nBad Username or Password !')) self.context['port'] = PortType @@ -166,7 +178,6 @@ class sugar_import(import_framework): if model_ids: model = model_obj.browse(self.cr, self.uid, model_ids)[0] if model.model == 'res.partner': - print "res partner" val['partner_id/.id'] = model.res_id val['history'] = "1" else: @@ -253,7 +264,6 @@ class sugar_import(import_framework): } def get_project_issue_priority(self, val): - print "project issue value" pp.pprint(val) priority_dict = { 'Urgent': '1', @@ -850,8 +860,8 @@ class import_sugarcrm(osv.osv): 'username': fields.char('User Name', size=64, required=True), 'password': fields.char('Password', size=24,required=True), - 'url' : fields.char('SugarSoap Api url:', size=264, required=True, help="Webservice's url where to get the data.'\ - exemple : http://example.com/sugarcrm/soap.php, or any address you see in your address bar http://trial.sugarcrm.com/qbquyj4802/index.php?module=Home&action=index"), + 'url' : fields.char('SugarSoap Api url:', size=264, required=True, help="Webservice's url where to get the data.\ + 'exemple : http://example.com/sugarcrm/soap.php, or copy the address of your sugarcrm application http://trial.sugarcrm.com/qbquyj4802/index.php?module=Home&action=index"), 'opportunity': fields.boolean('Leads and Opportunities', help="If Opportunities are checked, SugarCRM opportunities data imported in OpenERP crm-Opportunity form"), 'contact': fields.boolean('Contacts', help="If Contacts are checked, SugarCRM Contacts data imported in OpenERP partner address form"), @@ -884,9 +894,8 @@ class import_sugarcrm(osv.osv): 'email_from': 'tfr@openerp.com', 'username' : 'tfr', 'password' : 'a', - 'url': "http://trial.sugarcrm.com/qbquyj4802/index.php?module=Home&action=index" + 'url': "http://example.com/sugarcrm/soap.php" } - def get_key(self, cr, uid, ids, context=None): """Select Key as For which Module data we want import data.""" if not context: @@ -946,7 +955,7 @@ class import_sugarcrm(osv.osv): 'res_id': new_create_id, 'type': 'ir.actions.act_window', } - + def import_all(self, cr, uid, ids, context=None): # """Import all sugarcrm data into openerp module""" diff --git a/addons/import_sugarcrm/import_sugarcrm_view.xml b/addons/import_sugarcrm/import_sugarcrm_view.xml index 7445746c112..4b5e15b733d 100644 --- a/addons/import_sugarcrm/import_sugarcrm_view.xml +++ b/addons/import_sugarcrm/import_sugarcrm_view.xml @@ -40,9 +40,8 @@ - - - + + diff --git a/addons/import_sugarcrm/sugar.py b/addons/import_sugarcrm/sugar.py index 76c947f1078..1e8e1b4aefc 100644 --- a/addons/import_sugarcrm/sugar.py +++ b/addons/import_sugarcrm/sugar.py @@ -31,8 +31,8 @@ import tools class LoginError(Exception): pass def login(username, password, url): + loc = sugarsoapLocator() - portType = loc.getsugarsoapPortType(url) request = loginRequest() uauth = ns0.user_auth_Def(request) @@ -126,4 +126,3 @@ def search(portType, sessionid, module_name=None): ans_list.append(ans_dir) #end for return ans_list - diff --git a/addons/import_sugarcrm/sugarsoap_services.py b/addons/import_sugarcrm/sugarsoap_services.py index ea789dd3ef5..4362e1739e2 100644 --- a/addons/import_sugarcrm/sugarsoap_services.py +++ b/addons/import_sugarcrm/sugarsoap_services.py @@ -8,8 +8,11 @@ from sugarsoap_services_types import * from osv import osv from tools.translate import _ import socket - +import import_sugarcrm + IP = socket.gethostbyname(socket.gethostname()) + + try: import ZSI from ZSI.TCcompound import Struct @@ -18,8 +21,6 @@ except ImportError: raise osv.except_osv(_('ZSI Import Error!'), _('Please install SOAP for python - ZSI-2.0-rc3.tar.gz - python-zci')) - - # Locator class sugarsoapLocator: sugarsoapPortType_address = "http://"+ IP + "/sugarcrm/soap.php" @@ -43,7 +44,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP + "/sugarcrm/soap.php/create_session", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction= import_sugarcrm.URL+"/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) @@ -55,7 +56,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://" + IP + "/sugarcrm/soap.php/end_session", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -67,7 +68,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://" + IP + "/sugarcrm/soap.php/contact_by_email", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -79,7 +80,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://" + IP + "/sugarcrm/soap.php/user_list", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -91,7 +92,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/search", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -103,7 +104,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/track_email", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -115,7 +116,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/create_contact", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -127,7 +128,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/create_lead", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -139,7 +140,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/create_account", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -151,7 +152,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/create_opportunity", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -163,7 +164,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/create_case", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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,8 +175,9 @@ class sugarsoapBindingSOAP: if isinstance(request, loginRequest) is False: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} + # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/login", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -187,7 +189,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/is_loopback", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -199,7 +201,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/seamless_login", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -211,7 +213,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_entry_list", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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: @@ -226,7 +228,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_entry", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -238,7 +240,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_entries", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -250,7 +252,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/set_entry", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -262,7 +264,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/set_entries", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -274,7 +276,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/set_note_attachment", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -286,7 +288,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_note_attachment", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -298,7 +300,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/relate_note_to_module", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -310,7 +312,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_related_notes", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -322,7 +324,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/logout", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -334,7 +336,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_module_fields", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -346,7 +348,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_available_modules", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -358,7 +360,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/update_portal_user", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -370,7 +372,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/test", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -382,7 +384,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_user_id", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -394,7 +396,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_user_team_id", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -406,7 +408,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_server_time", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -418,7 +420,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_gmt_time", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -430,7 +432,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_sugar_flavor", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -442,7 +444,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_server_version", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -454,7 +456,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_relationships", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -466,7 +468,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/set_relationship", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -478,7 +480,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/set_relationships", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -490,7 +492,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/set_document_revision", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -502,7 +504,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/search_by_module", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -514,7 +516,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/sync_get_modified_relationships", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -526,7 +528,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_modified_entries", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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) @@ -538,7 +540,7 @@ class sugarsoapBindingSOAP: raise TypeError, "%s incorrect request type" % (request.__class__) kw = {} # no input wsaction - self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_attendee_list", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw) + self.binding.Send(None, None, request, soapaction=import_sugarcrm.URL+"/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)