[FIX] fix attachment right access (full access when not linked to an object)

lp bug: https://launchpad.net/bugs/347192 fixed

bzr revid: christophe@tinyerp.com-20090323135057-h4w3k6hnbzq88abz
This commit is contained in:
Christophe Simonis 2009-03-23 14:50:57 +01:00
parent c1fbc04b86
commit 148e3979fc
1 changed files with 2 additions and 1 deletions

View File

@ -33,7 +33,8 @@ class ir_attachment(osv.osv):
ids = [ids]
cr.execute('select distinct res_model from ir_attachment where id in ('+','.join(map(str, ids))+')')
for obj in cr.fetchall():
ima.check(cr, uid, obj[0], mode)
if obj[0]:
ima.check(cr, uid, obj[0], mode)
def search(self, cr, uid, args, offset=0, limit=None, order=None,
context=None, count=False):