diff --git a/addons/mail/mail_message_subtype.xml b/addons/mail/mail_message_subtype.xml index a79f5815bd1..156c366af30 100644 --- a/addons/mail/mail_message_subtype.xml +++ b/addons/mail/mail_message_subtype.xml @@ -5,7 +5,6 @@ mail.message.subtype.tree mail.message.subtype - 10 @@ -34,11 +33,25 @@ + + + edit.message.subtype.tree + mail.message.subtype + 9 + + + + + + + + Subtypes mail.message.subtype form tree,form + diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css index e4e112cdfaf..3ed2482911c 100644 --- a/addons/mail/static/src/css/mail.css +++ b/addons/mail/static/src/css/mail.css @@ -617,6 +617,12 @@ right: 0px; line-height: 20px; } +.openerp .oe_followers .oe_edit_subtype{ + cursor: pointer; + line-height: 26px; + position: absolute; + right: 12px; +} .openerp .oe_followers .oe_show_more{ cursor: pointer; diff --git a/addons/mail/static/src/js/mail_followers.js b/addons/mail/static/src/js/mail_followers.js index 41634fd2135..ba776995d5b 100644 --- a/addons/mail/static/src/js/mail_followers.js +++ b/addons/mail/static/src/js/mail_followers.js @@ -74,10 +74,29 @@ openerp_mail_followers = function(session, mail) { this.$el.on('click', '.oe_subtype_list input', self.do_update_subscription); // event: click on 'invite' button, that opens the invite wizard this.$('.oe_invite').on('click', self.on_invite_follower); + this.$el.on('click', '.oe_edit_subtype', self.on_edit_subtype); this.$el.on('click', '.oe_remove_follower', self.on_remove_follower); this.$el.on('click', '.oe_show_more', self.on_show_more_followers) }, + on_edit_subtype: function() { + var self = this; + var action = { + type: 'ir.actions.act_window', + res_model: 'mail.message.subtype', + domain: [['res_model','=', self.view.model]], + view_mode: 'list', + view_type: 'list', + views: [[false, 'list']], + target: 'new', + } + this.do_action(action, { + on_close: function() { + self.read_value(); + }, + }); + }, + on_invite_follower: function (event) { var self = this; var action = { diff --git a/addons/mail/static/src/xml/mail_followers.xml b/addons/mail/static/src/xml/mail_followers.xml index 459f13155a0..c22d253b1f7 100644 --- a/addons/mail/static/src/xml/mail_followers.xml +++ b/addons/mail/static/src/xml/mail_followers.xml @@ -32,6 +32,7 @@
+ Edit X