Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
4639 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
jul. 16
11346
1
okt. 20
4834
2
jun. 20
4560
5
dec. 17
5867
3
jan. 24
16895