summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js/mail.js
diff options
context:
space:
mode:
authorFabien Pinckaers <fp@openerp.com>2012-08-14 13:29:42 +0200
committerFabien Pinckaers <fp@openerp.com>2012-08-14 13:29:42 +0200
commitff9cbe0673eec425e5cd9caadbb0182a051b70bf (patch)
treed093984ce7cef63ca3f32374e0aa18a6210e0eec /addons/mail/static/src/js/mail.js
parent149c6f793f4f184dbf5265a7b70c4cf78ee43568 (diff)
parent85ca542ad09a8a9890db63e421a7509b681d36d6 (diff)
[MERGE] mail groups improvements
better form view security on groups: public, private, selected groups (for employees) menu automatically created/filtered action to open a specific group inline small fix in composition: new msg not linked to current user bzr revid: fp@openerp.com-20120814112942-8wo9owa14hk5xqbj
Diffstat (limited to 'addons/mail/static/src/js/mail.js')
-rw-r--r--addons/mail/static/src/js/mail.js8
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 da6816d3441..c068074b457 100644
--- a/addons/mail/static/src/js/mail.js
+++ b/addons/mail/static/src/js/mail.js
@@ -972,8 +972,11 @@ openerp.mail = function(session) {
this.params.limit = params.limit || 25;
this.params.domain = params.domain || [];
this.params.context = params.context || {};
+ this.params.res_model = params.res_model || false;
+ this.params.res_id = params.res_id || false;
this.params.search_view_id = params.search_view_id || false;
this.params.thread_level = params.thread_level || 1;
+ this.params.title = params.title || false;
this.comments_structure = {'root_ids': [], 'new_root_ids': [], 'msgs': {}, 'tree_struct': {}, 'model_to_root_ids': {}};
this.display_show_more = true;
this.thread_list = [];
@@ -1018,9 +1021,10 @@ openerp.mail = function(session) {
if (this.compose_message_widget) {
this.compose_message_widget.destroy();
}
+ debugger;
this.compose_message_widget = new mail.ComposeMessage(this, {
- 'extended_mode': false, 'uid': this.session.uid, 'res_model': 'res.users',
- 'res_id': this.session.uid, 'mode': mode || 'comment', 'msg_id': msg_id });
+ 'extended_mode': false, 'uid': this.session.uid, 'res_model': this.params.res_model,
+ 'res_id': this.params.res_id, 'mode': mode || 'comment', 'msg_id': msg_id });
var composition_node = this.$element.find('div.oe_mail_wall_action');
composition_node.empty();
var compose_done = this.compose_message_widget.appendTo(composition_node);