Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
3999 Näkymät

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
Hylkää

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

Paras vastaus

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
Hylkää

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',
],
},

Tekijä Paras vastaus

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
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
toukok. 25
947
2
maalisk. 24
5720
1
heinäk. 25
374
1
toukok. 25
4530
1
huhtik. 24
1318