'Adds an object (subdocument). The object must be an OpenDocument class
The return value will be the folder in the zipfile the object is stored in'

def addObject(self, document, objectname=None):

    self.childobjects.append(document)
    if (objectname is None):
        document.folder = ('%s/Object    %d' % (self.folder, len(self.childobjects)))
    else:
        document.folder = objectname
    return ('.%s' % document.folder)
