copy item from on ObjectManager to another?
--- In zope@yahoogroups.com, John Hunter <jdhunter@a...> wrote:
"Jonathan" == Jonathan Hobbs <toolkit@m...> writes:
Jonathan> do a google on 'manage_copyObjects'
Thanks - I'm not sure this method is appropriate though. I'm using the python API (eg in a product) and I've found this about manage_copyObjects
The argument to manage_copyObjects is a tuple of object IDs which must exist in the folder where you call the method.
and I can't work with this constraint, eg I'm not calling the method from the folder containing the objects. Then get the container object with:
myObj=self.restrictedTraverse(path) if myObj==None: #The object wasn't found #Raise an exception or return an error here else: #The object was found #Copy objects here Regards, Josef
Josef Meile wrote:
--- In zope@yahoogroups.com, John Hunter <jdhunter@a...> wrote:
> "Jonathan" == Jonathan Hobbs <toolkit@m...> writes:
Jonathan> do a google on 'manage_copyObjects'
Thanks - I'm not sure this method is appropriate though. I'm using the python API (eg in a product) and I've found this about manage_copyObjects
The argument to manage_copyObjects is a tuple of object IDs which must exist in the folder where you call the method.
and I can't work with this constraint, eg I'm not calling the method from the folder containing the objects. Then get the container object with:
myObj=self.restrictedTraverse(path) if myObj==None: #The object wasn't found #Raise an exception or return an error here else: #The object was found #Copy objects here Ops, I forgot, you have to pass "None" as the default value:
myObj=self.restrictedTraverse(path,None)
participants (1)
-
Josef Meile