summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js/thread_field.js
diff options
context:
space:
mode:
authorArnold Moyaux <arm@odoo.com>2018-01-12 16:21:48 +0100
committerSimon Lejeune <sle@openerp.com>2018-02-01 15:26:59 +0100
commit17f5f74af94384e040e39eb146ff5fbb84fb02ff (patch)
treeb01bf30034d5591155aa41d9ab70dcfa43eccfcb /addons/mail/static/src/js/thread_field.js
parent18d5b11cb4a58a3bd0676427d318249a127a6a5f (diff)
[IMP] mail: redirect on mail activity
Allow to redirect on a form view when the user click on a html tag a with data-oe-model and data-oe-id specified. In order to avoid code duplication the do_action already existing in mail_thread is moved in the action_manager and mail_thread and mail_activity use a trigger_up in order to call it.
Diffstat (limited to 'addons/mail/static/src/js/thread_field.js')
-rw-r--r--addons/mail/static/src/js/thread_field.js8
1 files changed, 2 insertions, 6 deletions
diff --git a/addons/mail/static/src/js/thread_field.js b/addons/mail/static/src/js/thread_field.js
index 00ea4e2037a..0a745b69a96 100644
--- a/addons/mail/static/src/js/thread_field.js
+++ b/addons/mail/static/src/js/thread_field.js
@@ -168,13 +168,9 @@ var ThreadField = AbstractField.extend({
});
},
_onRedirect: function (res_model, res_id) {
- this.do_action({
- type:'ir.actions.act_window',
- view_type: 'form',
- view_mode: 'form',
- res_model: res_model,
- views: [[false, 'form']],
+ this.trigger_up('redirect', {
res_id: res_id,
+ res_model: res_model,
});
},
_onUpdateMessage: function (message) {