summaryrefslogtreecommitdiff
path: root/addons/mail/static/src
diff options
context:
space:
mode:
Diffstat (limited to 'addons/mail/static/src')
-rw-r--r--addons/mail/static/src/js/mail.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js
index 21b0f5a9a87..5d54a6acc48 100644
--- a/addons/mail/static/src/js/mail.js
+++ b/addons/mail/static/src/js/mail.js
@@ -967,6 +967,24 @@ openerp.mail = function (session) {
this.$('.oe_reply').on('click', this.on_message_reply);
this.$('.oe_star').on('click', this.on_star);
this.$('.oe_msg_vote').on('click', this.on_vote);
+ this.$('.oe_mail_action_model').on('click', this.on_record_clicked);
+ },
+
+ on_record_clicked: function (event) {
+ event.stopPropagation();
+ var state = {
+ 'model': this.model,
+ 'id': this.res_id,
+ 'title': this.record_name
+ };
+ session.webclient.action_manager.do_push_state(state);
+ this.do_action({
+ res_model: state.model,
+ res_id: state.id,
+ type: 'ir.actions.act_window',
+ views: [[false, 'form']]
+ });
+ return false;
},
/* Call the on_compose_message on the thread of this message. */