コンテンツへスキップ
メニュー
この質問にフラグが付けられました
5 返信
1671 ビュー

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!?!

アバター
破棄
最善の回答

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.



アバター
破棄
最善の回答

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,


アバター
破棄
最善の回答

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

アバター
破棄
最善の回答

Any luck anyone?

アバター
破棄
著作者 最善の回答

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

アバター
破棄