[FIX]ir_attachement: not self.pool.get(model) instead of model not in self.pool

bzr revid: dle@openerp.com-20131206173602-no831oxc6m1kf6lu
This commit is contained in:
Denis Ledoux 2013-12-06 18:36:02 +01:00
parent aa9efd6dab
commit fb90e7d572
1 changed files with 1 additions and 1 deletions

View File

@ -242,7 +242,7 @@ class ir_attachment(osv.osv):
# performed in batch as much as possible.
ima = self.pool.get('ir.model.access')
for model, targets in model_attachments.iteritems():
if model not in self.pool:
if not self.pool.get(model):
continue
if not ima.check(cr, uid, model, 'read', False):
# remove all corresponding attachment ids