diff options
| author | Thibault Delavallée <tde@openerp.com> | 2015-07-29 13:33:56 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2015-07-30 10:19:14 +0200 |
| commit | 42c5eea6771e85b35f4dcfb840abd95ddcabb319 (patch) | |
| tree | 7662c661757d375cb78dda8331544cbae11d8870 /addons | |
| parent | 744d7e2331e1750141ec4b3d1bc14d7ef1593ec5 (diff) | |
[FIX] mail: chatter: do not crash when reading the chatter
of unactive records. The chatter now uses a correct read_ids (no need
to have a search set), with an active_test in the context allowing
to read on unactive records.
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/mail/static/src/js/mail.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 688faf3c1e7..63f9e4f05a5 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -859,8 +859,12 @@ var MailThread = Attachment.extend ({ this.nb_followers = 0; this.follower_ids = []; - this.ds_res = new data.DataSetSearch(this, this.model, this.context, [['id', '=', this.res_id]]); - this.ds_res.read_slice(['id', 'message_follower_ids']).then(function (data) { + var ctx = this.context; + ctx['active_test'] = true; + this.ds_res = new data.DataSet(this, this.model, ctx); + this.ds_res.read_ids([this.res_id], ['id', 'message_follower_ids'], { + 'context': ctx, + }).then(function (data) { self.follower_ids = data[0].message_follower_ids; self.nb_followers = data[0].message_follower_ids.length; self.followers_loaded.resolve(); |
