Is there a way to hide/remove the Send Message button in the Chatter box but still keep the Log Note and Activities in v16?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Boekhouding
- Voorraad
- PoS
- Project
- MRP
Deze vraag is gerapporteerd
Hi
Try with Following code
<t t-name="ChatterTopbar" t-inherit="mail.ChatterTopbar" t-inherit-mode="extension" owl="1">
<xpath expr="//div[hasclass('o_ChatterTopbar_controllers')]" position="replace">
<div class="o_ChatterTopbar_controllers d-flex pe-2" t-if="chatterTopbar.chatter.threadView">
<button class="o_ChatterTopbar_button o_ChatterTopbar_buttonSendMessage btn text-nowrap me-2"
type="button" style="display:none;"
t-att-class="{
'o-active btn-odoo': chatterTopbar.chatter.composerView and !chatterTopbar.chatter.composerView.composer.isLog,
'btn-odoo': !chatterTopbar.chatter.composerView,
'btn-light': chatterTopbar.chatter.composerView and chatterTopbar.chatter.composerView.composer.isLog,}"
t-att-disabled="!chatterTopbar.chatter.canPostMessage" data-hotkey="m"
t-on-click="chatterTopbar.chatter.onClickSendMessage">
Send message
</button>
<button class="o_ChatterTopbar_button o_ChatterTopbar_buttonLogNote btn text-nowrap"
type="button"
t-att-class="{
'o-active btn-odoo': chatterTopbar.chatter.composerView and chatterTopbar.chatter.composerView.composer.isLog,
'btn-light': chatterTopbar.chatter.composerView and !chatterTopbar.chatter.composerView.composer.isLog or !chatterTopbar.chatter.composerView,
}"
t-att-disabled="!chatterTopbar.chatter.isTemporary and !chatterTopbar.chatter.hasWriteAccess"
t-on-click="chatterTopbar.chatter.onClickLogNote" data-hotkey="shift+m">
Log note
</button>
</div>
</xpath>
</t>
</templates>
Regards
Hi Bella,
thanks for posting this. I tried creating a custom module, but using the code you provided in a static MXL file
and set up my manifest file like this
{
'name': 'Hide Send Message',
'version': '16.1.0',
'summary': 'Hide the Send Message Button in Sidebar Chatter',
'description': 'if you do not want to take a chance on your users sending messages to the wrong person, just hide the send message button all together',
'category': 'Tehcnical',
'author': 'me',
'website': 'https://www.me.com',
'depends': ['base'],
'sequence': -100,
'data': [
'static/xml/hide_chatter_send_message.xml',
],
'installable': True,
'application': True,
'auto_install': False,
}
when i go to activate it, i get the following final error
AssertionError: Document does not comply with schema
any ideas what i am doing wrong, sorry, i am new to working with custom app/modules.
you can add it in the manifest inside the assets
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
Aanmelden
Thank you, Bella. Where should this code be added?
You can create a src folder in your custom addon ,add a xml folder add this code into it
Enhance your Odoo mail chatter experience by dynamically controlling the visibility of key buttons based on user preferences.
With this app, administrators can configure visibility settings for the most commonly used buttons in the chatter interface, such as "Send Message", "Log Note", "Activities", and more. Tailor the interface to individual users or specific models, ensuring a streamlined, role-based user experience.
https://apps.odoo.com/apps/modules/16.0/mh_hide_chatter_view_buttons