cancel
Showing results for 
Search instead for 
Did you mean: 

moving folder

mohamed_moussa
Champ in-the-making
Champ in-the-making
hello
when i try to move a folder to another from odoo to alfresco i am using cmislib i have this bug :
i am using cmisSmiley TonguearentId
parentFolder = 'workspace://SpacesStore/945c820a-8fce-453b-98c4-521ba2df91d6'
Folder.updateProperties({u'cmisSmiley TonguearentId'Smiley TonguearentFolder,})

File "/usr/local/lib/python2.7/dist-packages/cmislib-0.5.1-py2.7.egg/cmislib/model.py", line 1952, in updateProperties
    **args)
  File "/usr/local/lib/python2.7/dist-packages/cmislib-0.5.1-py2.7.egg/cmislib/model.py", line 297, in put
    self._processCommonErrors(result)
  File "/usr/local/lib/python2.7/dist-packages/cmislib-0.5.1-py2.7.egg/cmislib/model.py", line 318, in _processCommonErrors
    raise InvalidArgumentException(error.status, error.url)
InvalidArgumentException: Error 400 at http://192.168.1.8:8080/alfresco/cmisatom/96d978c6-e387-4b95-a74d-1e5d6fc5fa22/entry?id=workspace%3A...

any help please
1 REPLY 1

jpotts
World-Class Innovator
World-Class Innovator
You cannot move an object by changing its parent ID. The parent ID is read-only.

Try using the move() method instead.


        >>> sub1 = repo.getObjectByPath('/cmislib/sub1')
        >>> sub2 = repo.getObjectByPath('/cmislib/sub2')
        >>> doc = repo.getObjectByPath('/cmislib/sub1/testdoc1')
        >>> doc.move(sub1, sub2)
        """


Jeff