[FIX] base: backport from trunk (r3318): fixed ir.attachment
bzr revid: olt@tinyerp.com-20110125142329-x1sf2qlazfiy6bdw
This commit is contained in:
parent
da2b68f725
commit
be6165db94
|
@ -44,8 +44,10 @@ class ir_attachment(osv.osv):
|
|||
if values:
|
||||
if 'res_model' in values and 'res_id' in values:
|
||||
res_ids.setdefault(values['res_model'],[]).append(values['res_id'])
|
||||
|
||||
|
||||
for model, mids in res_ids.items():
|
||||
cr.execute('select id from '+self.pool.get(model)._table+' where id in %s', (tuple(ids),))
|
||||
mids = [x[0] for x in cr.fetchall()]
|
||||
self.pool.get(model).check_access_rule(cr, uid, mids, mode, context=context)
|
||||
|
||||
def search(self, cr, uid, args, offset=0, limit=None, order=None,
|
||||
|
|
Loading…
Reference in New Issue