跳至內容
選單
此問題已被標幟
1 回覆
4609 瀏覽次數

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

頭像
捨棄
最佳答案

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
}
頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
7月 16
11316
1
10月 20
4809
2
6月 20
4512
5
12月 17
5851
3
1月 24
16863