Ir al contenido
Menú
Se marcó esta pregunta
5 Respuestas
1669 Vistas

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
Descartar
Mejor respuesta

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
Descartar
Mejor respuesta

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
Descartar
Mejor respuesta

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
Descartar
Mejor respuesta

Any luck anyone?

Avatar
Descartar
Autor Mejor respuesta

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
Descartar