From 148e3979fcde8d4d00f7d536529e70c4bf0e306d Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Mon, 23 Mar 2009 14:50:57 +0100 Subject: [PATCH] [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 --- bin/addons/base/ir/ir_attachment.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/addons/base/ir/ir_attachment.py b/bin/addons/base/ir/ir_attachment.py index dd1934de698..b1a1eef9e4c 100644 --- a/bin/addons/base/ir/ir_attachment.py +++ b/bin/addons/base/ir/ir_attachment.py @@ -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):