diff options
| author | mra (Open ERP) <mra@tinyerp.com> | 2010-03-16 18:07:24 +0530 |
|---|---|---|
| committer | mra (Open ERP) <mra@tinyerp.com> | 2010-03-16 18:07:24 +0530 |
| commit | e4b8dfbc6affe764eaaef3dbc1a9eabf41063cec (patch) | |
| tree | e0055a9057fda3555713f264ef179d911af87138 /addons/document/document_directory.py | |
| parent | 4771021d88484281eb63e988bb3c12dc6612f688 (diff) | |
| parent | d80e1e599fad0f875f895b97350ec104ea28731e (diff) | |
[MERGE] merge with main branch
bzr revid: mra@tinyerp.com-20100316123724-zowixvrdtiko72fb
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) |
