diff --git a/addons/mail/__manifest__.py b/addons/mail/__manifest__.py index f5b04c83bb6..affb4c00312 100644 --- a/addons/mail/__manifest__.py +++ b/addons/mail/__manifest__.py @@ -200,6 +200,7 @@ 'mail/static/src/utils/throttle/throttle.js', 'mail/static/src/utils/timer/timer.js', 'mail/static/src/utils/utils.js', + 'mail/static/src/webclient/commands/command_category.js', 'mail/static/src/widgets/discuss/discuss.js', 'mail/static/src/widgets/discuss_invite_partner_dialog/discuss_invite_partner_dialog.js', 'mail/static/src/widgets/form_renderer/form_renderer.js', diff --git a/addons/mail/static/src/components/chatter_container/chatter_container.xml b/addons/mail/static/src/components/chatter_container/chatter_container.xml index 94e0d210017..03266a5bd52 100644 --- a/addons/mail/static/src/components/chatter_container/chatter_container.xml +++ b/addons/mail/static/src/components/chatter_container/chatter_container.xml @@ -2,7 +2,7 @@ -
+
diff --git a/addons/mail/static/src/components/chatter_topbar/chatter_topbar.xml b/addons/mail/static/src/components/chatter_topbar/chatter_topbar.xml index fb1c03aae17..7e555d938fd 100644 --- a/addons/mail/static/src/components/chatter_topbar/chatter_topbar.xml +++ b/addons/mail/static/src/components/chatter_topbar/chatter_topbar.xml @@ -13,6 +13,8 @@ 'o-bordered': chatter.hasExternalBorder, }" t-att-disabled="chatter.isDisabled" + title="Send a message" + data-hotkey="m" t-on-click="_onClickSendMessage" > Send message @@ -25,12 +27,14 @@ }" t-att-disabled="chatter.isDisabled" t-on-click="_onClickLogNote" + title="Log a note" + data-hotkey="shift+m" > Log note - diff --git a/addons/mail/static/src/components/messaging_menu/messaging_menu.scss b/addons/mail/static/src/components/messaging_menu/messaging_menu.scss index 0f03eb25f4f..ad9e3a144a3 100644 --- a/addons/mail/static/src/components/messaging_menu/messaging_menu.scss +++ b/addons/mail/static/src/components/messaging_menu/messaging_menu.scss @@ -37,7 +37,7 @@ * As a result, Min() is ignored by SCSS while CSS interprets as its min() function. */ max-height: Min(calc(100vh - 140px), 630px); - z-index: 1100; // on top of chat windows + z-index: 1050; // on top of chat windows } &.o-mobile { diff --git a/addons/mail/static/src/webclient/commands/command_category.js b/addons/mail/static/src/webclient/commands/command_category.js new file mode 100644 index 00000000000..61dcf48c4df --- /dev/null +++ b/addons/mail/static/src/webclient/commands/command_category.js @@ -0,0 +1,7 @@ +/** @odoo-module **/ + +import { registry } from "@web/core/registry"; +import { _lt } from "@web/core/l10n/translation"; + +const commandCategoryRegistry = registry.category("command_categories"); +commandCategoryRegistry.add("mail", { label: _lt("Discuss") }, { sequence: 20 }); diff --git a/addons/web/static/src/legacy/js/components/dropdown_menu.js b/addons/web/static/src/legacy/js/components/dropdown_menu.js index daac4502716..d9e09d4495a 100644 --- a/addons/web/static/src/legacy/js/components/dropdown_menu.js +++ b/addons/web/static/src/legacy/js/components/dropdown_menu.js @@ -184,6 +184,8 @@ odoo.define('web.DropdownMenu', function (require) { }, title: { type: String, optional: 1 }, closeOnSelected: { type: Boolean, optional: 1 }, + hotkey: { type: String, optional: 1 }, + hotkeyTitle: { type: String, optional: 1 }, }; DropdownMenu.template = 'web.DropdownMenu'; diff --git a/addons/web/static/src/legacy/js/views/form/form_renderer.js b/addons/web/static/src/legacy/js/views/form/form_renderer.js index 512b39dfe07..3608efe53b6 100644 --- a/addons/web/static/src/legacy/js/views/form/form_renderer.js +++ b/addons/web/static/src/legacy/js/views/form/form_renderer.js @@ -1139,7 +1139,7 @@ var FormRenderer = BasicRenderer.extend({ this.$el.toggleClass('o_form_nosheet', !this.has_sheet); if (this.has_sheet) { this.$el.children().not('.o_FormRenderer_chatterContainer') - .wrapAll($('
', {class: 'o_form_sheet_bg'})); + .wrapAll($('
', {class: 'o_form_sheet_bg', 'data-command-category': "app"})); } this.$el.toggleClass('o_form_editable', this.mode === 'edit'); this.$el.toggleClass('o_form_readonly', this.mode === 'readonly'); diff --git a/addons/web/static/src/legacy/xml/base.xml b/addons/web/static/src/legacy/xml/base.xml index 932cc98fc79..e8c24225ec8 100644 --- a/addons/web/static/src/legacy/xml/base.xml +++ b/addons/web/static/src/legacy/xml/base.xml @@ -4,7 +4,7 @@ -
+
@@ -824,14 +831,14 @@