projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
abf16c5
)
[FIX] mail_message: in check_access_rules, use self._table instead of hadcodded mail_...
author
Thibault Delavallée
<tde@openerp.com>
Mon, 17 Sep 2012 16:04:35 +0000
(18:04 +0200)
committer
Thibault Delavallée
<tde@openerp.com>
Mon, 17 Sep 2012 16:04:35 +0000
(18:04 +0200)
bzr revid: tde@openerp.com-
20120917160435
-9ktdy4vpznvwr51s
addons/mail/mail_message.py
patch
|
blob
|
history
diff --git
a/addons/mail/mail_message.py
b/addons/mail/mail_message.py
index
d2bafca
..
9a9013c
100644
(file)
--- a/
addons/mail/mail_message.py
+++ b/
addons/mail/mail_message.py
@@
-301,7
+301,7
@@
class mail_message(osv.Model):
# Read mail_message.ids to have their values
model_record_ids = {}
message_values = dict.fromkeys(ids)
- cr.execute('SELECT DISTINCT id, model, res_id, author_id FROM mail_message WHERE id = ANY (%s)', (ids,))
+ cr.execute('SELECT DISTINCT id, model, res_id, author_id FROM "%s" WHERE id = ANY (%%s)' % self._table, (ids,))
for id, rmod, rid, author_id in cr.fetchall():
message_values[id] = {'res_model': rmod, 'res_id': rid, 'author_id': author_id}
if rmod: