From 009a39f90e649780fb1286f3864e8b8dfe39d32b Mon Sep 17 00:00:00 2001
From: Sebastien Robin <seb@nexedi.com>
Date: Wed, 11 Feb 2004 13:38:50 +0000
Subject: [PATCH] corrected a very old bug, _modifyProxy was not called with
 the good object

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@472 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5SyncML/Conduit/ERP5Conduit.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/product/ERP5SyncML/Conduit/ERP5Conduit.py b/product/ERP5SyncML/Conduit/ERP5Conduit.py
index 64023d5393..9ec35d6bab 100755
--- a/product/ERP5SyncML/Conduit/ERP5Conduit.py
+++ b/product/ERP5SyncML/Conduit/ERP5Conduit.py
@@ -159,6 +159,7 @@ class ERP5Conduit(XMLSyncUtilsMixin):
           else: # CPS content
             # This is specific to CPS, we will call the proxy tool
             px_tool= getToolByName(object,'portal_proxies')
+            trees_tool= getToolByName(object,'portal_trees')
             proxy_type = 'document'
             if portal_type == 'Workspace':
               proxy_type = 'folder'
@@ -167,8 +168,9 @@ class ERP5Conduit(XMLSyncUtilsMixin):
             proxy.isIndexable = 0 # So it will not be reindexed, this prevent errors
             # Calculate rpath
             utool = getToolByName(object, 'portal_url')
-            rpath = utool.getRelativeUrl(object)
+            rpath = utool.getRelativeUrl(proxy)
             px_tool._modifyProxy(proxy,rpath)
+            trees_tool.notify_tree('sys_modify_object',proxy,rpath)
 
           subobject = object._getOb(object_id)
         self.newObject(object=subobject,xml=xml,simulate=simulate)
-- 
2.30.9