summaryrefslogtreecommitdiff
path: root/addons/mail/static/src
diff options
context:
space:
mode:
authorFrédéric van der Essen <fva@openerp.com>2013-07-12 12:05:16 +0200
committerFrédéric van der Essen <fva@openerp.com>2013-07-12 12:05:16 +0200
commita8ea08cf284fcc0aa2c2b6662348df1b69b4e698 (patch)
tree380da75f171b4903ffc301ed04edaa12fdb4c4bb /addons/mail/static/src
parentd697f759c23b94d2bb49e618cb2f87081531b414 (diff)
parent12f58092f2df0d7236dbadf346765bcb37ae5929 (diff)
[MERGE] from upstream
bzr revid: fva@openerp.com-20130712100516-mk14z6zqebdje3ud
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. */