Commit 7c9800d8 authored by Sebastien Robin's avatar Sebastien Robin

add parameter for special cases

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14481 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9b22e41d
......@@ -279,7 +279,7 @@ class BaobabConduit(ERP5Conduit):
# Function to search the parent object where the new content must be construct.
# Given parameter is the special encoded portal type that represent the path to
# the wanted destination.
def findObjectFromSpecialPortalType(special_portal_type):
def findObjectFromSpecialPortalType(special_portal_type,object_id=None):
# The first part or portal type, for example "Mandataire"
source_portal_type = special_portal_type.split('_')[0]
# The place where we should build,
......@@ -371,7 +371,7 @@ class BaobabConduit(ERP5Conduit):
### handle agent objects
elif portal_type.startswith('Mandataire'):
# Get the person or organisation thanks to the portal_type
dest = findObjectFromSpecialPortalType(portal_type)
dest = findObjectFromSpecialPortalType(portal_type,object_id=object_id)
if dest == None: return None
subobject = dest.newContent( portal_type = 'Agent'
, id = object_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