diff options
| author | apa-tiny <apa@tinyerp.com> | 2010-03-16 17:33:08 +0530 |
|---|---|---|
| committer | apa-tiny <apa@tinyerp.com> | 2010-03-16 17:33:08 +0530 |
| commit | 4e2d697bbcaed951ff8d6e2f4dbb40d0b9634401 (patch) | |
| tree | d1c5191015ffd025f99876c9f612be8d822dd115 /addons/document/document_directory.py | |
| parent | 8ea773c793398546341f31360cde91a5f23fecef (diff) | |
| parent | d80e1e599fad0f875f895b97350ec104ea28731e (diff) | |
[MERGE]
bzr revid: apa@tinyerp.com-20100316120308-1xmdokjpg3xr3fet
Diffstat (limited to 'addons/document/document_directory.py')
| -rw-r--r-- | addons/document/document_directory.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/addons/document/document_directory.py b/addons/document/document_directory.py index 17c3dfb66d9..554eae43e08 100644 --- a/addons/document/document_directory.py +++ b/addons/document/document_directory.py @@ -64,8 +64,7 @@ class document_directory(osv.osv): def _get_root_directory(self, cr,uid, context=None): objid=self.pool.get('ir.model.data') try: - mid = objid._get_id(cr, uid, 'document', 'dir_root') - return False # TODO: check why not display root dir + mid = objid._get_id(cr, uid, 'document', 'dir_root') if not mid: return False except Exception, e: @@ -199,8 +198,8 @@ class document_directory(osv.osv): path.append(duri[0]) duri = duri[1:] did = nid[0] - - return (nodes.node_dir(path, nparent,ncontext,self.browse(cr,uid,did, context)), duri) + root_node = did and self.browse(cr,uid,did, context) or False + return (nodes.node_dir(path, nparent,ncontext, root_node), duri) nid = self.search(cr,uid,[('parent_id','=',did),('name','=',duri[0]),('type','=','ressource')], context=context) |
