'Change the name of the given page
:param view_id : id of the view to rename
:param new_name : name to use'

@api.model
def rename_page(self, view_id, new_name):

    view = self.key_to_view_id(view_id)
    if view:
        new_name = slugify(new_name, max_length=50)
        prefix = view.key.split('.')[0]
        if (not new_name.startswith(prefix)):
            new_name = ('%s.%s' % (prefix, new_name))
        view.write({'key': new_name, 'arch_db': view.arch_db.replace(view.key, new_name, 1)})
        return new_name
    return False
