跳至内容
菜单
此问题已终结
2 回复
3939 查看

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?

形象
丢弃

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

最佳答案

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

形象
丢弃

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

编写者 最佳答案

Thanks for your answer Janiesh,


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


形象
丢弃
相关帖文 回复 查看 活动
1
5月 25
891
2
3月 24
5657
1
7月 25
312
1
5月 25
4466
1
4月 24
1292