summaryrefslogtreecommitdiff
path: root/addons/document/nodes.py
diff options
context:
space:
mode:
authorP. Christeas <p_christ@hol.gr>2010-10-27 13:23:23 +0300
committerP. Christeas <p_christ@hol.gr>2010-10-27 13:23:23 +0300
commitda5aaac52c3e8e397b33b85a23f5454172ca3c43 (patch)
treedaf53272ad523e57013747f1f19b1792875d6c84 /addons/document/nodes.py
parentd1ee286bcb7f73daa856ef96ae31836d6e8fcd9d (diff)
document: minor improvement at nodes.
bzr revid: p_christ@hol.gr-20101027102323-dmy92wbks216awe6
Diffstat (limited to 'addons/document/nodes.py')
-rw-r--r--addons/document/nodes.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/document/nodes.py b/addons/document/nodes.py
index d32ccf49440..3a3e6fab54b 100644
--- a/addons/document/nodes.py
+++ b/addons/document/nodes.py
@@ -985,9 +985,9 @@ class node_res_obj(node_class):
where1 = []
if obj._parent_name in obj.fields_get(cr, uid):
where1 = where + [(obj._parent_name, '=', self.res_id)]
+ namefield = directory.resource_field.name or 'name'
resids = obj.search(cr, uid, where1, context=ctx)
for bo in obj.browse(cr, uid, resids, context=ctx):
- namefield = directory.resource_field.name or 'name'
if not bo:
continue
res_name = getattr(bo, namefield)