From da5aaac52c3e8e397b33b85a23f5454172ca3c43 Mon Sep 17 00:00:00 2001 From: "P. Christeas" Date: Wed, 27 Oct 2010 13:23:23 +0300 Subject: [PATCH] document: minor improvement at nodes. bzr revid: p_christ@hol.gr-20101027102323-dmy92wbks216awe6 --- addons/document/nodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)