Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
3553 มุมมอง

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.


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ค. 25
546
2
มี.ค. 24
5296
1
พ.ค. 25
4102
Odoo 15: Change placeholder of chatter แก้ไขแล้ว
1
เม.ย. 24
1058
0
ก.ย. 23
1435