Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
2 Respostas
3817 Visualizações

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
Cancelar

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

Melhor resposta

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
Cancelar

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

Autor Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
1
mai. 25
752
2
mar. 24
5555
1
jul. 25
119
1
mai. 25
4369
1
abr. 24
1221