Commit 0b7e0f87 authored by Sebastien Robin's avatar Sebastien Robin

by Nicolas, allow to specify product name when importing a conduit

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14281 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ee110eaa
......@@ -1118,9 +1118,16 @@ class XMLSyncUtils(XMLSyncUtilsMixin):
alert_code = self.getAlertCode(remote_xml)
# Import the conduit and get it
conduit_name = subscriber.getConduit()
conduit_module = __import__('.'.join([Conduit.__name__, conduit_name]), globals(), locals(), [''])
conduit = getattr(conduit_module, conduit_name)()
if conduit_name.startswith('Products'):
path = conduit_name
conduit_name = conduit_name.split('.')[-1]
LOG('SyncMLUtils.SyncModif (path,conduit_name)',0,(path,conduit_name))
conduit_module = __import__(path, globals(), locals(), [''])
conduit = getattr(conduit_module, conduit_name)()
else:
conduit_module = __import__('.'.join([Conduit.__name__, conduit_name]),
globals(), locals(), [''])
conduit = getattr(conduit_module, conduit_name)()
LOG('SyncModif, subscriber:',0,subscriber)
# Then apply the list of actions
(xml_confirmation,has_next_action,cmd_id) = self.applyActionList(cmd_id=cmd_id,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment