From 59e5081a0d5e6a5e15cf956b99e038f51bf382da Mon Sep 17 00:00:00 2001 From: husen daudi Date: Thu, 13 Aug 2009 17:25:49 +0530 Subject: module:document improved resource domain eval with uid bzr revid: hda@hda-20090813115549-xhwbxfq010u7jb9j --- addons/document/document.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/document/document.py') diff --git a/addons/document/document.py b/addons/document/document.py index 1b0d6ad680f..cafbb074e28 100644 --- a/addons/document/document.py +++ b/addons/document/document.py @@ -174,7 +174,7 @@ class node_class(object): res = fobj.browse(self.cr, self.uid, file_ids, context=self.context) result +=map(lambda x: node_class(self.cr, self.uid, self.path+'/'+eval('x.'+fobj._rec_name), x, False, context=self.context, type='file', root=self.root), res) if self.type=='collection' and self.object.type=="ressource": - where = self.object.domain and eval(self.object.domain, {'active_id':self.root}) or [] + where = self.object.domain and eval(self.object.domain, {'active_id':self.root, 'uid':self.uid}) or [] pool = pooler.get_pool(self.cr.dbname) obj = pool.get(self.object.ressource_type_id.model) _dirname_field = obj._rec_name -- cgit v1.2.3