From 2743ee0b97431df101efeab129eff8a952345b26 Mon Sep 17 00:00:00 2001 From: XRG <> Date: Wed, 18 Aug 2010 11:30:48 +0530 Subject: [PATCH] [FIX] WebDAV: fix the displayname property, for /webdav and /webdav/dbname bzr revid: hmo@tinyerp.com-20100818060048-eg5d58e30ey0tir6 --- addons/document_webdav/dav_fs.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/document_webdav/dav_fs.py b/addons/document_webdav/dav_fs.py index 5d641cb39c0..798f277580b 100644 --- a/addons/document_webdav/dav_fs.py +++ b/addons/document_webdav/dav_fs.py @@ -395,7 +395,11 @@ class openerp_dav_handler(dav_interface): cr, uid, pool, dbname, uri2 = self.get_cr(uri) if not dbname: if cr: cr.close() - return COLLECTION + # at root, dbname, just return the last component + # of the path. + if uri2 and len(uri2) < 2: + return uri2[-1] + return '' node = self.uri2object(cr, uid, pool, uri2) if not node: if cr: cr.close()