Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
5 Antwoorden
1663 Weergaven

Hello,

i try to access to the chatter on the right to change the label of the button "Send message"

Before v16, i can just change the translation but in v16 it is not possible anymore.

Is anybody know how to do that in v16

I tried to override the chatter but it doesn't works for now!?!

Avatar
Annuleer
Beste antwoord

i think its a QWeb Template which is different from .xml files

see this file:

addons/mail/static/src/components/chatter_topbar/chatter_topbar.xml

check the path, it resides in static folder.

note: 3 more are there in addons path, don't know which one and how to inherit and modify.



Avatar
Annuleer
Beste antwoord

Hi,

Inherit 'ChatterTopbar' templates and add a label for the button send message  with the desired one

<?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="labelaria-label" >custom name</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',
],
},


Replace custom name with the desired name.


Hope it helps,


Avatar
Annuleer
Beste antwoord

This is a work-around. Try inherit the view, replace the button with your new button using all the same attribute except the label 

Avatar
Annuleer
Beste antwoord

Any luck anyone?

Avatar
Annuleer
Auteur Beste antwoord

Hello SmithJohn45

Thank you for your answer

I already found those static files but don't talk about them to have more ideas

And like you i don't know how to override those files. I tried with t-extend and other but nothing works for now

Avatar
Annuleer