diff options
| author | Alexandre Kühn <aku@odoo.com> | 2018-08-17 11:08:27 +0200 |
|---|---|---|
| committer | Alexandre Kühn <aku@odoo.com> | 2018-08-17 16:28:39 +0200 |
| commit | 6d53cd3201d440b045bc54bd7c3a0cb8c4c5f37d (patch) | |
| tree | 1cfc62a17b9406f9eb07edf046ff9762af5532f7 | |
| parent | 11b24b42d30a465740c655fa3efe4e4adec7e264 (diff) | |
[REF] mail,im_livechat,digest: rename 'chat_client_action' to 'Discuss'
Revision on https://github.com/odoo/odoo/commit/02ec09cb1c3e2d7bc7968f40c18f2208d7f3f498#diff-6d76770b1b7cf716d60a4d76a1555c1d
The commit above mostly renamed 'Client Action' to 'Discuss',
but there were some leftovers.
| -rw-r--r-- | addons/digest/data/digest_data.xml | 2 | ||||
| -rw-r--r-- | addons/mail/controllers/main.py | 4 | ||||
| -rw-r--r-- | addons/mail/data/mail_data.xml | 2 | ||||
| -rw-r--r-- | addons/mail/static/src/js/discuss.js | 2 | ||||
| -rw-r--r-- | addons/mail/static/src/js/systray/systray_messaging_menu.js | 2 | ||||
| -rw-r--r-- | addons/mail/static/src/js/thread_field.js | 2 | ||||
| -rw-r--r-- | addons/mail/static/src/js/thread_windows/thread_window.js | 2 | ||||
| -rw-r--r-- | addons/mail/static/tests/systray/systray_messaging_menu_tests.js | 3 | ||||
| -rw-r--r-- | addons/mail/views/mail_channel_views.xml | 12 |
9 files changed, 15 insertions, 16 deletions
diff --git a/addons/digest/data/digest_data.xml b/addons/digest/data/digest_data.xml index 42607cd3401..853f684f15b 100644 --- a/addons/digest/data/digest_data.xml +++ b/addons/digest/data/digest_data.xml @@ -23,7 +23,7 @@ <center> <img src="/digest/static/src/img/notification.png" width="70%" height="100%"/><br/> </center> - ${', '.join(users.mapped('name'))} signed up. Say hello in the <a href="/web#action=mail.mail_channel_action_client_chat&active_id=${channel_id}" style="color: #006d6b;">company's discussion channel.</a> + ${', '.join(users.mapped('name'))} signed up. Say hello in the <a href="/web#action=mail.action_discuss&active_id=${channel_id}" style="color: #006d6b;">company's discussion channel.</a> </div> </div> </div> diff --git a/addons/mail/controllers/main.py b/addons/mail/controllers/main.py index 7049b995ad1..7a9d6b82838 100644 --- a/addons/mail/controllers/main.py +++ b/addons/mail/controllers/main.py @@ -22,7 +22,7 @@ class MailController(http.Controller): @classmethod def _redirect_to_messaging(cls): - url = '/web#%s' % url_encode({'action': 'mail.mail_channel_action_client_chat'}) + url = '/web#%s' % url_encode({'action': 'mail.action_discuss'}) return werkzeug.utils.redirect(url) @classmethod @@ -244,7 +244,7 @@ class MailController(http.Controller): 'commands': request.env['mail.channel'].get_mention_commands(), 'mention_partner_suggestions': request.env['res.partner'].get_static_mention_suggestions(), 'shortcodes': request.env['mail.shortcode'].sudo().search_read([], ['source', 'substitution', 'description']), - 'menu_id': request.env['ir.model.data'].xmlid_to_res_id('mail.mail_channel_menu_root_chat'), + 'menu_id': request.env['ir.model.data'].xmlid_to_res_id('mail.menu_root_discuss'), 'is_moderator': request.env.user.is_moderator, 'moderation_counter': request.env.user.moderation_counter, 'moderation_channel_ids': request.env.user.moderation_channel_ids.ids, diff --git a/addons/mail/data/mail_data.xml b/addons/mail/data/mail_data.xml index 31f94aacabc..f26beef2a71 100644 --- a/addons/mail/data/mail_data.xml +++ b/addons/mail/data/mail_data.xml @@ -358,7 +358,7 @@ <p>Hello <t t-esc='record.name'/></p> <p>You have messages to moderate, please go for the proceedings.</p><br/><br/> <div style="text-align: center;"> - <a href="/web#action=mail.mail_channel_action_client_chat&active_id=mailbox_moderation" style="background-color: #1abc9c; padding: 20px; text-decoration: none; color: #fff; border-radius: 5px; font-size: 16px;" class="o_default_snippet_text">Moderate Messages</a> + <a href="/web#action=mail.action_discuss&active_id=mailbox_moderation" style="background-color: #1abc9c; padding: 20px; text-decoration: none; color: #fff; border-radius: 5px; font-size: 16px;" class="o_default_snippet_text">Moderate Messages</a> <br/><br/><br/> </div> <p>Thank you!</p> diff --git a/addons/mail/static/src/js/discuss.js b/addons/mail/static/src/js/discuss.js index 27ad9f79f91..258b5a32c0a 100644 --- a/addons/mail/static/src/js/discuss.js +++ b/addons/mail/static/src/js/discuss.js @@ -1474,7 +1474,7 @@ var Discuss = AbstractAction.extend(ControlPanelMixin, { }, }); -core.action_registry.add('mail.chat.instant_messaging', Discuss); +core.action_registry.add('mail.discuss', Discuss); return Discuss; diff --git a/addons/mail/static/src/js/systray/systray_messaging_menu.js b/addons/mail/static/src/js/systray/systray_messaging_menu.js index 733d4f88da2..d4b1b078a02 100644 --- a/addons/mail/static/src/js/systray/systray_messaging_menu.js +++ b/addons/mail/static/src/js/systray/systray_messaging_menu.js @@ -113,7 +113,7 @@ var MessagingMenu = Widget.extend({ discussOptions.active_id = channelID; } - this.do_action('mail.mail_channel_action_client_chat', discussOptions) + this.do_action('mail.action_discuss', discussOptions) .then(function () { // we cannot 'go back to previous page' otherwise self.trigger_up('hide_home_menu'); diff --git a/addons/mail/static/src/js/thread_field.js b/addons/mail/static/src/js/thread_field.js index a239481931b..5484fb1aa61 100644 --- a/addons/mail/static/src/js/thread_field.js +++ b/addons/mail/static/src/js/thread_field.js @@ -197,7 +197,7 @@ var ThreadField = AbstractField.extend({ var self = this; this.call('mail_service', 'joinChannel', channelID).then(function () { // Execute Discuss with 'channel' as default channel - self.do_action('mail.mail_channel_action_client_chat', { active_id: channelID }); + self.do_action('mail.action_discuss', { active_id: channelID }); }); }, /** diff --git a/addons/mail/static/src/js/thread_windows/thread_window.js b/addons/mail/static/src/js/thread_windows/thread_window.js index 1d38ee338d3..f0662b531b9 100644 --- a/addons/mail/static/src/js/thread_windows/thread_window.js +++ b/addons/mail/static/src/js/thread_windows/thread_window.js @@ -279,7 +279,7 @@ var ThreadWindow = AbstractThreadWindow.extend({ res_id: this._thread.getDocumentID(), }); } else { - this.do_action('mail.mail_channel_action_client_chat', { + this.do_action('mail.action_discuss', { clear_breadcrumbs: false, active_id: this.hasThread() ? this._getThreadID() : undefined, on_reverse_breadcrumb: function () { diff --git a/addons/mail/static/tests/systray/systray_messaging_menu_tests.js b/addons/mail/static/tests/systray/systray_messaging_menu_tests.js index 6aae156da11..16458550406 100644 --- a/addons/mail/static/tests/systray/systray_messaging_menu_tests.js +++ b/addons/mail/static/tests/systray/systray_messaging_menu_tests.js @@ -161,8 +161,7 @@ QUnit.test('messaging menu widget: no crash when clicking on inbox notification }, intercepts: { /** - * Simulate action 'mail.mail_channel_action_client_chat' - * successfully performed. + * Simulate action 'mail.action_discuss' successfully performed. * * @param {OdooEvent} ev * @param {function} ev.data.on_success called when success action performed diff --git a/addons/mail/views/mail_channel_views.xml b/addons/mail/views/mail_channel_views.xml index 3d48c50e1b0..38407642c02 100644 --- a/addons/mail/views/mail_channel_views.xml +++ b/addons/mail/views/mail_channel_views.xml @@ -193,9 +193,9 @@ - <record id="mail_channel_action_client_chat" model="ir.actions.client"> - <field name="name">Chat</field> - <field name="tag">mail.chat.instant_messaging</field> + <record id="action_discuss" model="ir.actions.client"> + <field name="name">Discuss</field> + <field name="tag">mail.discuss</field> <field name="res_model">mail.channel</field> <field name="params" eval=""{ 'default_active_id': 'mailbox_inbox' @@ -203,9 +203,9 @@ </record> <menuitem - id="mail.mail_channel_menu_root_chat" + id="mail.menu_root_discuss" name="Discuss" - action="mail_channel_action_client_chat" + action="action_discuss" web_icon="mail,static/description/icon.png" groups="base.group_user" sequence="1"/> @@ -216,7 +216,7 @@ --> <record id="mail.mail_channel_integrations_menu" model="ir.ui.menu"> <field name="name">Integrations</field> - <field name="parent_id" ref="mail.mail_channel_menu_root_chat"></field> + <field name="parent_id" ref="mail.menu_root_discuss"></field> <field name="active" eval="False"></field> </record> |
