I want to change send message button text. this chatter is available on right section of helpdesk ticket. I appreciate if someone help me out in this
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Comptabilitat
- Inventari
- PoS
- Project
- MRP
This question has been flagged
Hi,
Try with the following code.
<templates>
<t t-name="important.Chatter" t-inherit="mail.Chatter"
t-inherit-mode="extension">
<xpath expr="//*[contains(@class, 'o-mail-Chatter-sendMessage')]"
position="replace">
<button class="o-mail-Chatter-sendMessage btn text-nowrap me-1" t-att-class="{
'btn-primary': state.composerType !== 'note',
'btn-secondary': state.composerType === 'note',
'active': state.composerType === 'message',
'my-2': !props.compactHeight
}" t-att-disabled="!state.thread.hasWriteAccess and !(state.thread.hasReadAccess and state.thread.canPostOnReadonly) and props.threadId" data-hotkey="m" t-on-click="() => this.toggleComposer('message')">
Your Button Name
</button>
</xpath>
</t>
</templates>
Reference:
-https://www.cybrosys.com/blog/how-to-add-a-custom-button-to-the-chatter-in-odoo-18
Hope it helps
Thanks for your timely support. I appreciate , if you guide me to change the Log note button text also.
Getting this error if apply this on Log Note button.
OwlError: An error occured in the owl lifecycle (see this Error's "cause" property)
Error: An error occured in the owl lifecycle (see this Error's "cause" property)
at handleError (https://hui-opco-staging-22166402.dev.odoo.com/web/assets/f8a0653/web.assets_web.min.js:972:101)
at App.handleError (https://hui-opco-staging-22166402.dev.odoo.com/web/assets/f8a0653/web.assets_web.min.js:1619:29)
at Fiber._render (https://hui-opco-staging-22166402.dev.odoo.com/web/assets/f8a0653/web.assets_web.min.js:997:19)
at Fiber.render (https://hui-opco-staging-22166402.dev.odoo.com/web/assets/f8a0653/web.assets_web.min.js:995:6)
at ComponentNode.initiateRender (https://hui-opco-staging-22166402.dev.odoo.com/web/assets/f8a0653/web.assets_web.min.js:1065:47)
Caused by: Error: Element '<xpath expr="//*[contains(@class, 'o-mail-Chatter-logNote') and @data-hotkey='n']" position="replace">
<button class="o-mail-Chatter-logNote btn text-nowrap me-1" t-att-class="{ 'btn-secondary': state.composerType !== 'message', 'btn-primary': state.composerType === 'note', 'active': state.composerType === 'note', 'my-2': !props.compactHeight }" t-att-disabled="!state.thread.hasWriteAccess and props.threadId" data-hotkey="n" t-on-click="() => this.toggleComposer('note')">
Internal Note
</button>
</xpath>' cannot be located in element tree
Error: Element '<xpath expr="//*[contains(@class, 'o-mail-Chatter-logNote') and @data-hotkey='n']" position="replace">
<button class="o-mail-Chatter-logNote btn text-nowrap me-1" t-att-class="{ 'btn-secondary': state.composerType !== 'message', 'btn-primary': state.composerType === 'note', 'active': state.composerType === 'note', 'my-2': !props.compactHeight }" t-att-disabled="!state.thread.hasWriteAccess and props.threadId" data-hotkey="n" t-on-click="() => this.toggleComposer('note')">
Internal Note
</button>
</xpath>' cannot be located in element tree
Hii,
Create or update your custom module.
Add an XML file like this:
<!-- my_module/views/chatter_button_override.xml --> <odoo> <template id = "custom_chatter_send_message_button" inherit_id = "mail.chatter"> <xpath expr = "//button[@class='o_chatter_button_send']" position = "attributes"> <attribute name = "title" >Send Update </attribute> </xpath> <xpath expr = "//button[@class='o_chatter_button_send']/span" position = "replace"> <span>Send Update </span> </xpath> </template> </odoo>
This will replace the text "Send message" with "Send Update"
i hope it is usefull
Hi , Thanks for your time but this code is giving error, template name not found. I would recommend Cybrosys Answer. That one is working.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Registrar-seRelated Posts | Respostes | Vistes | Activitat | |
---|---|---|---|---|
|
1
de jul. 25
|
76 | ||
|
0
de nov. 23
|
1033 | ||
|
0
de març 25
|
1224 | ||
|
2
d’abr. 25
|
961 | ||
|
0
d’oct. 24
|
1263 |