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
- Buchhaltung
- Lager
- PoS
- Project
- MRP
Diese Frage wurde gekennzeichnet
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.
Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!
Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!
RegistrierenVerknüpfte Beiträge | Antworten | Ansichten | Aktivität | |
---|---|---|---|---|
|
1
Juli 25
|
409 | ||
|
0
Nov. 23
|
1153 | ||
|
0
März 25
|
1478 | ||
|
2
Apr. 25
|
1119 | ||
|
0
Okt. 24
|
1457 |