[FIX] WebDAV: fix the displayname property, for /webdav and /webdav/dbname

bzr revid: hmo@tinyerp.com-20100818060048-eg5d58e30ey0tir6
This commit is contained in:
XRG
2010-08-18 11:30:48 +05:30
committed by Harry (OpenERP)
parent cc45f27a79
commit 2743ee0b97
+5 -1
View File
@@ -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()