diff options
| author | olt@tinyerp.com <> | 2011-01-25 15:23:29 +0100 |
|---|---|---|
| committer | olt@tinyerp.com <> | 2011-01-25 15:23:29 +0100 |
| commit | be6165db947fcd8a6e9914baaab5280d0e30f32f (patch) | |
| tree | f639114459fa4b5509fab4872e1badefedbfebba /bin | |
| parent | da2b68f725e3fe50a3d2ab4c8df1ca215eebc049 (diff) | |
[FIX] base: backport from trunk (r3318): fixed ir.attachment
bzr revid: olt@tinyerp.com-20110125142329-x1sf2qlazfiy6bdw
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/addons/base/ir/ir_attachment.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/addons/base/ir/ir_attachment.py b/bin/addons/base/ir/ir_attachment.py index 0e2ae2ad13d..af4c8c1861c 100644 --- a/bin/addons/base/ir/ir_attachment.py +++ b/bin/addons/base/ir/ir_attachment.py @@ -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, |
