Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
3852 Weergaven

Hi all,


In odoo15 I want to remove Send Message Button. If i remove it in the source code it can work. When I remove it from the source code it works but I want to do it with custom addon.Here is the full path: addons\mail\static\src\components\chatter_topbar\chatter_topbar.xml


But I don't want to interfere with the source code, so I decided to write a new addon, but I couldn't write it correctly. Can you help me how to write the Custom Addon in XML file?

Avatar
Annuleer

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

Beste antwoord

Hello matar,


I hope this message finds you well.


To hide send Message Button from chatter in odoo 15, add below code inside your_custom_module/static/src/chatter_topbar.xml

Please find code in comment. 

I hope this will help you.

Thanks & Regards,
Email: odoo@aktivsoftware.com     

Skype: kalpeshmaheshwari

Avatar
Annuleer

Please find code here:-

<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-inherit="mail.ChatterTopbar" t-inherit-mode="extension">
<xpath expr="//button[hasclass('o_ChatterTopbar_buttonSendMessage')]" position="attributes">
<attribute name="class" add="d-none" separator=" "></attribute>
</xpath>
</t>
</templates>

Also, Add your xml file in manifest as below,

'assets': {
'web.assets_qweb': [
'your_custom_module/static/src/chatter_topbar.xml',
],
},

Auteur Beste antwoord

Thanks for your answer Janiesh,


When I write addon as you said, I got the following error: AssertionError: Document does not comply with schema.


Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
mei 25
804
2
mrt. 24
5587
1
jul. 25
206
1
mei 25
4403
1
apr. 24
1248