[IMP] document:- improve code.

bzr revid: ysa@tinyerp.co.in-20100427122042-emy0yej0mg28ktui
This commit is contained in:
Ysa (Open ERP) 2010-04-27 17:50:42 +05:30
parent 264d3f4247
commit 7d632ff159
1 changed files with 2 additions and 4 deletions

View File

@ -105,11 +105,9 @@ class document_directory(osv.osv):
]
def name_get(self, cr, uid, ids, context={}):
res = []
all_ids = self.search(cr,uid,[])
if not self.search(cr,uid,[('id','in',ids)]):
ids = []
for d in self.browse(cr, uid, ids, context=context):
if d.id not in all_ids:
continue
s = ''
d2 = d
while d2 and d2.parent_id: