Skip to Content
Menú
This question has been flagged

Hi all,

in my xml 


<header>
<button onclick="myFunction()" name="click_me" string="Click"
class="oe_highlight"/>
</header>

and in my custom .js file 


function myFunction() {
alert("Hello! I am an alert box!!");
}

the javascript function called after i button pressed but the create/save buttons got disable like below 

https://prnt.sc/qyb8m9

Avatar
Descartar
Best Answer

The easy way fix is just use enable trick on your js

function myFunction() {
alert("Hello! I am an alert box!!");
//enable the button that is disabled for example save/cancel button ​$('.o_form_button_save').prop('disabled', false); // Enable Save button $('.o_form_button_cancel').prop('disabled', false); // Enable Cancel button
}
Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de jul. 16
11396
1
d’oct. 20
4869
2
de juny 20
4609
5
de des. 17
5921
3
de gen. 24
16937