'Set name for folder'

def autoname(self):

    if self.is_folder:
        if self.folder:
            self.name = self.get_name_based_on_parent_folder()
        else:
            self.name = self.file_name
    else:
        self.name = frappe.generate_hash(u'', 10)
