[FIX] ir_attachement: search, if the model of the ir_attachement has been removed, the search ignore the attachement.
bzr revid: dle@openerp.com-20131206162314-vjpgtag8qhkl1jhk
This commit is contained in:
parent
f177669af9
commit
4669f05406
|
@ -242,6 +242,8 @@ 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:
|
||||
continue
|
||||
if not ima.check(cr, uid, model, 'read', False):
|
||||
# remove all corresponding attachment ids
|
||||
for attach_id in itertools.chain(*targets.values()):
|
||||
|
|
Loading…
Reference in New Issue