summaryrefslogtreecommitdiff
path: root/addons/document
diff options
context:
space:
mode:
authorHarry (Open ERP) <hmo@tinyerp.com>2009-12-09 18:48:51 +0530
committerHarry (Open ERP) <hmo@tinyerp.com>2009-12-09 18:48:51 +0530
commit21b45c94bca3e962c668bf7fd5574cdf695e20ea (patch)
treeea526ea68eeb9144017fdf65ddf382c2c67d6c01 /addons/document
parent8777bb210a334f27f64e380131d7f050f2a35f8c (diff)
[FIX] document : fix problem to get files of res obj node
bzr revid: hmo@tinyerp.com-20091209131851-07u1bp2gqwxv1ady
Diffstat (limited to 'addons/document')
-rw-r--r--addons/document/nodes.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/addons/document/nodes.py b/addons/document/nodes.py
index fb377fed03c..ac15b0a359c 100644
--- a/addons/document/nodes.py
+++ b/addons/document/nodes.py
@@ -62,13 +62,12 @@ class node_context(object):
""" Although this fn passes back to doc.dir, it is needed since
it is a potential caching point """
- (ndir, duri) = self._dirobj._locate_child(cr,self.uid, self.rootdir,uri, None, self)
-
+ (ndir, duri) = self._dirobj._locate_child(cr,self.uid, self.rootdir,uri, None, self)
while duri:
ndir = ndir.child(cr, duri[0])
if not ndir:
- return False
- duri = duri[1:]
+ return False
+ duri = duri[1:]
return ndir
@@ -506,11 +505,11 @@ class node_res_obj(node_class):
name = getattr(bo, namefield)
if not name:
continue
- res.append(node_res_obj(name, self, self.context, self.res_model, res_bo = bo))
- return res
+ res.append(node_res_obj(name, self, self.context, self.res_model, res_bo = bo))
+ if name:
+ where.append(('name','=',name))
where = [('parent_id','=',self.dir_id) ]
- ids = dirobj.search(cr, uid, where,context=ctx)
- res = []
+ ids = dirobj.search(cr, uid, where,context=ctx)
if ids:
for dirr in dirobj.browse(cr,uid,ids,context=ctx):
if dirr.type == 'directory':