summaryrefslogtreecommitdiff
path: root/addons/mail/static/src
diff options
context:
space:
mode:
authorAntony Lesuisse <al@openerp.com>2012-06-08 19:00:05 +0200
committerAntony Lesuisse <al@openerp.com>2012-06-08 19:00:05 +0200
commit93590e6a2b2221c9c8b72bbbfe5ca83bc7c0dc4b (patch)
treef13d8877a684510c1c0fe5c6686c1bbbdd1f2a14 /addons/mail/static/src
parentd74734ddee499577351618bc6250304c63095a3e (diff)
parent787df16f84426411c7844c40f942400dfd7741bf (diff)
[MERGE] trunk
bzr revid: al@openerp.com-20120608170005-exk83se779u3py4x
Diffstat (limited to 'addons/mail/static/src')
-rw-r--r--addons/mail/static/src/css/mail.css1
-rw-r--r--addons/mail/static/src/js/mail.js10
2 files changed, 5 insertions, 6 deletions
diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css
index d37a85de73f..f8975d67b78 100644
--- a/addons/mail/static/src/css/mail.css
+++ b/addons/mail/static/src/css/mail.css
@@ -1,3 +1,4 @@
+
/* ------------------------------ */
/* Wall */
/* ------------------------------ */
diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js
index b565c7e73c0..905e95f3aef 100644
--- a/addons/mail/static/src/js/mail.js
+++ b/addons/mail/static/src/js/mail.js
@@ -476,10 +476,12 @@ openerp.mail = function(session) {
// QWeb template to use when rendering the object
template: 'RecordThread',
- init: function() {
+ init: function() {
this._super.apply(this, arguments);
this.see_subscribers = true;
this.thread = null;
+ this.params = this.get_definition_options();
+ this.params.thread_level = this.params.thread_level || 0;
// datasets
this.ds = new session.web.DataSet(this, this.view.model);
this.ds_users = new session.web.DataSet(this, 'res.users');
@@ -520,12 +522,8 @@ openerp.mail = function(session) {
// create and render Thread widget
this.$element.find('div.oe_mail_recthread_left').empty();
if (this.thread) this.thread.destroy();
- // hack: for groups and users
- if (this.view.model == 'mail.group') thread_level = 1;
- if (this.view.model == 'res.users') thread_level = 1;
- else thread_level = 0;
this.thread = new mail.Thread(this, {'res_model': this.view.model, 'res_id': this.view.datarecord.id, 'uid': this.session.uid,
- 'thread_level': thread_level, 'show_post_comment': true, 'limit': 15});
+ 'thread_level': this.params.thread_level, 'show_post_comment': true, 'limit': 15});
var thread_done = this.thread.appendTo(this.$element.find('div.oe_mail_recthread_left'));
return fetch_sub_done && thread_done;
},