I'm working on customizing the mail.Chatter template in Odoo 17 to hide specific buttons, such as "Send Message" and "Log Note," in certain scenarios. I've tried using XML inheritance and XPath to modify the mail.Chatter template in my module, as follows:
<t t-name="akf.child.mail.Chatter" t-inherit="mail.Chatter">
<xpath expr="//button[contains(@class, 'o-mail-Chatter-sendMessage')]" position="attributes">
<attribute name="t-if">false</attribute>
</xpath>
</t>
However, when I load my module, I get an error indicating that the template name is missing or that the inheritance is incorrect.
Has anyone successfully customized mail.Chatter in Odoo 17 to hide elements like these buttons? What would be the recommended approach, and is there a better way to control the visibility of buttons in mail.Chatter?
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/17.0/mh_hide_chatter_view_buttons