I write javascript as below and try to change build-in button'text. I test the javascript in google chroe is successful.
But I do now know where to put the javascript. How to I modify the code to odoo' style?
var elements1 = document.getElementsByClassName('btn btn-sm oe_button btn-primary o_formdialog_save');
if (elements1.length == 1)
{
var e1 = elements1[0];
e1.textContent="Save(One)";
}
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
1
Antworten
3025
Ansichten
I want to change the button text "儲存 & 關閉" to be "儲存(僅一品項)".
But I do not want to use the thanslation of language.
I had wroten the javascript code to change the button text successfully in the google chrome devtools' console.
I do not know wehere should I put the javascript code.
Should I put the javascript to start function or another place?
Should I transfer the javascript to the javascript of the odoo syntax?
Those are the javascript as below:
var elements1 = document.getElementsByClassName('btn btn-sm oe_button btn-primary o_formdialog_save');
if (elements1.length == 1)
{
var e1 = elements1[0];
e1.textContent="儲存(僅一品項)";
}
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 | |
---|---|---|---|---|
|
6
März 18
|
65680 | ||
|
1
Juli 17
|
3079 | ||
|
0
März 24
|
973 | ||
|
0
Jan. 19
|
3859 | ||
|
0
Sept. 17
|
3051 |
Do you want to change "save" button's text?